What: dataset search misses obvious matches. Uppercase and multi-word queries return nothing, and long words match only through the description.
Why it matters: users on prod searching a title they can see get no results.
Evidence (/api/search/dataset/?query=…, 2026-09-18), against the title "KHOJ - Dataset about the judges of the Telangana High Court":
| query |
dev |
prod |
khoj |
2 |
3 |
KHOJ |
0 |
0 |
high court |
0 |
0 |
Cause: generate_q_expression in api/views/search_dataset.py builds fuzzy queries, which aren't analyzed, so the raw input is compared as one term. The title is indexed by ngram_analyser as lowercase 4-character grams (search/documents/analysers.py), so only short, lowercase, single-word queries can match a gram within the fuzzy edit distance.
Fix: not fixed. Likely a multi_match (analyzed) query for text fields, keeping fuzziness as an option.
What: dataset search misses obvious matches. Uppercase and multi-word queries return nothing, and long words match only through the description.
Why it matters: users on prod searching a title they can see get no results.
Evidence (
/api/search/dataset/?query=…, 2026-09-18), against the title "KHOJ - Dataset about the judges of the Telangana High Court":khojKHOJhigh courtCause:
generate_q_expressioninapi/views/search_dataset.pybuildsfuzzyqueries, which aren't analyzed, so the raw input is compared as one term. The title is indexed byngram_analyseras lowercase 4-character grams (search/documents/analysers.py), so only short, lowercase, single-word queries can match a gram within the fuzzy edit distance.Fix: not fixed. Likely a
multi_match(analyzed) query for text fields, keeping fuzziness as an option.