Skip to content

Dataset search returns nothing for uppercase or multi-word queries #202

Description

@saqibmanan

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions