Skip to content

Filter by publisher seems to be broken #1522

@jthomasmock

Description

@jthomasmock

Howdy! I am noticing that this is closed this as done:
#1447
However, I don’t see it working on the web, even for the exact search term example with publisher:vscode. Is it not really deployed yet?

Per @netomi the change is present in the current deployment, however the implementation seems to have a flaw.

It uses the term (https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-term-query.html) query for namespaces

However, elastic search transforms the namespace name during analysis

e.g. ms-vscode becomes ms and vscode

Thus the search for publisher:vscode will match for ms-vscode as well

this is a bug and should be fixed.

the fix will most likely be to change

boolQuery.must(QueryBuilders.term(builder -> builder.field("namespace").value(options.namespace()).caseInsensitive(true)));
##> to
boolQuery.must(QueryBuilders.term(builder -> builder.field("namespace.raw").value(options.namespace()).caseInsensitive(true)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working correctly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions