{"record":{"id":"b76e692089a0862a","repo":"zincsearch/zincsearch","slug":"not-implemented-b76e69","errorCode":"not_implemented","errorMessage":"[%s] query doesn't support","messagePattern":"\\[(.+?)\\] query doesn't support","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/uquery/query_dsl_parser.go","lineNumber":49,"sourceCode":"\t\"github.com/zincsearch/zincsearch/pkg/uquery/query\"\n\t\"github.com/zincsearch/zincsearch/pkg/uquery/sort\"\n\t\"github.com/zincsearch/zincsearch/pkg/uquery/source\"\n)\n\n// ParseQueryDSL parse query DSL and return searchRequest\nfunc ParseQueryDSL(q *meta.ZincQuery, mappings *meta.Mappings, analyzers map[string]*analysis.Analyzer) (bluge.SearchRequest, error) {\n\t// parse size\n\tif q.Size > config.Global.MaxResults {\n\t\tq.Size = config.Global.MaxResults\n\t}\n\n\t// parse query\n\tquery, err := query.Query(q.Query, mappings, analyzers)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif query == nil {\n\t\treturn nil, errors.New(errors.ErrorTypeNotImplemented, fmt.Sprintf(\"[%s] query doesn't support\", q.Query))\n\t}\n\n\t// create search request\n\trequest := bluge.NewTopNSearch(q.Size, query).WithStandardAggregations()\n\n\t// parse highlight\n\tif q.Highlight != nil {\n\t\t_ = highlight.Request(q.Highlight)\n\t\trequest.IncludeLocations()\n\t}\n\n\t// parse from\n\tif q.From > 0 {\n\t\trequest.SetFrom(q.From)\n\t}\n\n\t// parse explain\n\tif q.Explain {","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/zincsearch/zincsearch/blob/dd2f8afd6562d4d52c41b2c5d312280e684a25ba/pkg/uquery/query_dsl_parser.go#L31-L67","documentation":"ParseQueryDSL dispatches the query clause to query.Query; when the dispatcher returns nil without error (an unrecognized or unimplemented query name), it surfaces not_implemented with the raw query object in the message, meaning the query type string is not in the supported registry.","triggerScenarios":"POST /api/search with q.Query containing an unknown or unimplemented query name such as {\"function_score\": {...}}, {\"dis_max\": {...}}, or a typo like {\"match_all\": false}-style malformed names — from Search or MultiSearch.","commonSituations":"Migrating ES queries using advanced query types (function_score, script_score, percolate); typos in query type names; older clients using deprecated query syntax.","solutions":["Check the query type name for typos against the supported list (term, terms, match, match_all, bool, range, wildcard, fuzzy, prefix, etc.)","Replace unsupported ES query types with equivalent supported ones (e.g. bool should/filter for function_score)","Move unsupported computation to application-side filtering","Consult the zincsearch docs/source query registry for exact supported names"],"exampleFix":"// before\n{\"query\": {\"function_score\": {\"query\": {\"match_all\": {}}, \"boost_mode\": \"multiply\"}}}\n// after\n{\"query\": {\"bool\": {\"should\": [{\"match_all\": {}}]}}}","handlingStrategy":"validation","validationCode":"const supported = new Set(['term','terms','match','match_all','match_phrase','bool','range','wildcard','fuzzy','prefix','ids','exists','query_string','nested','multi_match','date_range','numeric_range','aggregation']);\nconst [type] = Object.keys(q.query);\nif (!supported.has(type)) throw new Error(`unsupported query type: ${type}`);","typeGuard":"null","tryCatchPattern":"try { await search(body); } catch (e) { if (e.code === 'not_implemented' && /query doesn't support/.test(e.message)) { /* fall back to a supported query shape */ } else throw e; }","preventionTips":["Maintain an allowlist of supported query types in client code","Check release notes when upgrading","Reject unknown query types early in query builders"],"tags":["query-dsl","unsupported-feature","dsl-parser"],"backgroundTag":"unsupported-query-type","analyzedSha":"dd2f8afd6562d4d52c41b2c5d312280e684a25ba","analyzedAt":"2026-09-03T00:22:38.551Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}