Smile-SA / elasticsuite

Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
https://elasticsuite.io
Open Software License 3.0
762 stars 341 forks source link

Unreliable searching in Greek Language #2762

Closed cptX closed 1 year ago

cptX commented 2 years ago

Unreliable searching in Greek Language:

  1. Spellchecking not working!
  2. words not taken into account: "No exact results found"
  3. using capital letters breaks search results, for example "κορνΑ"
  4. autocomplete and search not giving the same results

Preconditions

Magento Version : 2.4.5 CE ElasticSuite Version : 2.10.12.1 (This patch version was created after realizing autocorrect and search were not working in greek without accents) Environment : Developer Third party modules : none

Steps to reproduce

Actual result

  1. Create a product named "Ηλεκτρική κόρνα" and add some description in the page builder field that again contains the words "Ηλεκτρική κόρνα"
  2. Empty cache and reindex

Test 1: search for mispelled word "κώρνα": no result is shown

Test 2: search for correctly spelled "ηλεκτρική": No exact results found for: 'ηλεκτρική'. The displayed items are the closest matches. Product is shown as suggestion but why "No exact results found"? The word is written exactly like that!

Test 3: Search for the word "κορνΑ". Autocomplete correctly matches and suggests the product but search produces no results!

Expected result

Test 1:

  1. Searching for "κώρνα" should return product "Ηλεκτρική κόρνα"
  2. Searching for "ηλεκτρική" should return product "Ηλεκτρική κόρνα"
  3. Searching for "κορνΑ" should return product "Ηλεκτρική κόρνα"
romainruaud commented 2 years ago

Hello @cptX

can you ensure to do a cache:clean and a reindex now that you have 2.10.12.1 version ?

Once it's done, please share again the settings and the mapping of your catalog_product_index.

Regards

cptX commented 2 years ago

Hi @romainruaud ,

after 2 days, having restarted my computer twice, and having added several new products I have some different behavior: Test 1: search for mispelled word "κώρνα": Previously: no result is shown > Now: result shows the wanted product with the message: "No exact results found for: 'κώρνα'. The displayed items are the closest matches.". Is this the expected behavior for spell correction? Test 2: search for correctly spelled "ηλεκτρική": Previously: No exact results found for: 'ηλεκτρική'. > Now: 1 exact result found! (So this now works as expected) Test 3: Search for the word "κορνΑ". Still I get no results! In my opinion every search should be independent of lower or upper case characters!

New Test 4: Searching for word "ιλεκτρική" with the first letter mispelled (correct word is "ηλεκτρική" and exists in a product as shown in test 2) gives no results! So spelling correction is not working at the moment!

Please take the new results into account and tell me if you need extra information or tests. Can you please explain why there results were so different in my first tests even if I had tried cache:clear and reindex several times? Why restarting the computer or elasticsearch service makes a difference?

rbayet commented 2 years ago

Hello @cptX,

Concerning

New Test 4: Searching for word "ιλεκτρική" with the first letter mispelled (correct word is "ηλεκτρική" and exists in a product as shown in test 2) gives no results! So spelling correction is not working at the moment!

This is expected if you didn't changed the default settings for fuzziness/spellcheck : there is a setting which defines the "fuzziness prefix" length, ie the number of letters at the start of the word that are not supposed to be changed to find word variations. By default, its value is 1, so a typo on a first letter will not lead to fuzzy matches.

Regards

cptX commented 2 years ago

@rbayet thanks for your answer! This explains a lot and helps me understand better. But still I think the issue is not only with the first letter! For example if I search for "ηλεκτρηκη" instead of the correct "ηλεκτρικη" I get no results!

romainruaud commented 1 year ago

I'm closing this, we've done our maximum on this, we could probably engage more time in the eventuality of having a customer paying for it.

But as part of the Open Source version, we've been engaging a lot already.

regards