UPDATE: Sorry for posting it here, it was meant for magento 2, smile/elasticsuite. I’ll keep it here for reference if somebody wants to shed some light on my problems.
Hi, several years now I’m facing the following problem:
I have an e-shop with 2 store views: Greek and English. Greek is the default
What I want to achieve is the customer to be able to search for the same keywords independently of which store view is using. I have customers that are speaking english but happened to get into a greek page, and customers that are greek and happened to get into my eshop by following a link in google that was showing an english page. Anyway it is crucial to be able to search for the same keywords.
In order to achieve this I tried the following steps:
- Created a custom field called “search_terms”. I made it global and put “standard_edge_ngram” as the default analyzer
- In every product I wrote keywords both in english and in greek.
But I have the following problems:
-
Autocomplete, in the greek store view it works as expected but only if first you have searched that term by running a full search. I want this to work even before you have done a full search. I remember Ruad saying this is by design but I never understood why. This makes absolute no sense. I want the autocomplete to work on every term and with incomplete words even nobody had ever searched for that term. As it is now it is confusing the customers because in the first search of the term if the autocomplete never returns a thing the customer thinks the product is not existing at all, so he never presses enter or completes the search… Why is it designed like that and how can I change it? I want autocomplete to return all the results the search would return even without having the term presearched.
-
When being in the english store view things are not working. English view uses another stemmer that doesn’t remove the accents and doesn’t use icu folding and other necessary stuff for greek language. In order to fix that I did the following:
- Created a new module that tried to modify elasticsuite_analysis.xml and elasticsuite_indices.xml but whatever effort I did looks like elasticsuite is not accepting my bypasses, it is like ignoring all my modifications. Why is this? Can somebody tell me how can I created my own modifications in filters, analysis, stemmers etc???
- Tried to change the core of elasticsuite directly but again the results are poor. For some reason the system is using only the shingle analyzer, I’m not able to change that with all methods I tried. It is like being hardcoded to elasticsuite and cannot be overriden…
So can anyone answer these questions?
- How can I make autocomplete work without presearching a term
- How can I bypass the search analysis, filters, stemmers in elasticsuite
Another approach I thought was to keep the search_terms per store, and use a two step searching, for example first search in greek store view and if nothing found then search in english store view, but this would have other issues too…
Please help, I have lost so many workdays on this!