Closed alexgarel closed 1 week ago
In the search bar, when typing a single letter and deleting it, an autocomplete query with an empty q
to the server:
http://search.localhost:8000/autocomplete?q=&langs=en&taxonomy_names=brands,categories&size=5
In en
language, when searching chicken
, I have the following results:
I was expecting Chickens
as first result instead of chicken meat
(both terms are linked to the same taxonomy entry en:chickens
).
Also, the search results are not normalized: some are capitalized, some are not.
Clicking on a brand suggested by auto-completion does not seem to work. For example, with Casino
, we have 0 results when clicking on autosuggestion, while clicking on casino
on the left brand panel returns 4.3k results.
It looks like it's due to wrong language prefix added when clicking on autosuggestion:
Clicking on a brand suggested by auto-completion does not seem to work. For example, with Casino, we have 0 results when clicking on autosuggestion, while clicking on casino on the left brand panel returns 4.3k results. It looks like it's due to wrong language prefix added when clicking on autosuggestion
The prefix is not wrong in regard to the taxonomy… but the brands_tags field is different from the rest of the _tags field because it has no language prefix…
I will remove the language prefix for now.
In en language, when searching chicken, I have the following results: I was expecting Chickens as first result instead of chicken meat (both terms are linked to the same taxonomy entry en:chickens).
Also, the search results are not normalized: some are capitalized, some are not.
I tried to change entries order in the array, but it does not change… and don't know how to change that in Elasticsearch…
So I added the entry name in the label, this way it's more easy to understand.
We could get a category image using wikidata: https://wikidata.org/w/rest.php/wikibase/v1/entities/items/Q20034?_fields=type,labels,descriptions,aliases,statements,sitelinks (image is P18)
I tried to change entries order in the array, but it does not change… and don't know how to change that in Elasticsearch… So I added the entry name in the label, this way it's more easy to understand.
That's fine, it's a very minor issue :)
Improvements on taxonomies completion API:
TODO: