{"record":{"id":"d690f3c9a85b23dc","repo":"weaviate/weaviate","slug":"nested-clause-at-pos-d-w","errorCode":null,"errorMessage":"nested clause at pos %d: %w","messagePattern":"nested clause at pos (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"adapters/repos/db/inverted/searcher.go","lineNumber":616,"sourceCode":"\t}\n\tchildren := make([]*propValuePair, len(operands))\n\teg := enterrors.NewErrorGroupWrapper(s.logger)\n\touterConcurrencyLimit := concurrency.BudgetFromCtx(ctx, concurrency.GOMAXPROCS)\n\teg.SetLimit(outerConcurrencyLimit)\n\n\tconcurrencyReductionFactor := min(len(operands), outerConcurrencyLimit)\n\n\tfor i, clause := range operands {\n\t\ti, clause := i, clause\n\t\teg.Go(func() error {\n\t\t\tctx := concurrency.ContextWithFractionalBudget(ctx, concurrencyReductionFactor, concurrency.GOMAXPROCS)\n\t\t\tchild, err := s.buildPropValuePair(ctx, &clause, className, class)\n\t\t\t// check for stopword errors on ContainsAny operator only at the end\n\t\t\tif err != nil && errors.Is(err, ErrOnlyStopwords) && operator == filters.ContainsAny {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"nested clause at pos %d: %w\", i, err)\n\t\t\t}\n\t\t\tchildren[i] = child\n\t\t\treturn nil\n\t\t}, clause)\n\t}\n\tif err := eg.Wait(); err != nil {\n\t\treturn nil, fmt.Errorf(\"nested query: %w\", err)\n\t}\n\ti := 0\n\tfor _, c := range children {\n\t\tif c != nil {\n\t\t\tchildren[i] = c\n\t\t\ti++\n\t\t}\n\t}\n\tchildren = children[:i]\n\n\t// if all children were stopwords and the operator is ContainsAny,","sourceCodeStart":598,"sourceCodeEnd":634,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/adapters/repos/db/inverted/searcher.go#L598-L634","documentation":"extractPropValuePairs wraps a nested-clause build failure with its operand position: buildPropValuePair failed for the i-th operand of a filter group. Note the special case: an ErrOnlyStopwords failure under ContainsAny is swallowed (treated as an empty match) rather than wrapped, matching Weaviate's stopword semantics.","triggerScenarios":"Thrown at adapters/repos/db/inverted/searcher.go:616 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use 'nested clause at pos %d' to locate the failing operand in the query filter","Fix the operand's filter (invalid property, operator, or value per the inner error)","For stopword-only ContainsAny operands, adjust stopwords config or expect empty results"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}