-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable To Search Multiple Select Attribute Code in Store Frontend "Your search returned no results." #94
Comments
I confirm the issue. I am investigating on this one and will try to provide a fix quickly. Regards. |
@romainruaud I can Also Confirm this issue is with using a Dropdown Box & Multi select & possible the other options. The issue below may or may not be relevant to #94 but the issue below is a core Magento2 issue #6253 Confirming that this issue is a Magento 2 core issue going to be posting new issue on Magento2. |
Using the Luma catalog, I use the "Climate" attribute. If I search a first time for "hoodie", I see there are 20 hoodies having the "Spring" value for the "Climate" attribute. If I search again for "spring hoodie" => no result. So I decided to look at the term vector query which is triggered to determine if we have to process a fuzzy search or an exact search. Eg the following term vector query : Which results in : { "_index": "magento2_default_catalog_product_20160913_153628", "_type": "product", "_version": 0, "found": true, "took": 2, "term_vectors": { "spelling": { "field_statistics": { "sum_doc_freq": 13182, "doc_count": 187, "sum_ttf": 17148 }, "terms": { "spring": { "term_freq": 1, "tokens": [ { "position": 0, "start_offset": 0, "end_offset": 6 } ] } } }, "spelling.phonetic": { "field_statistics": { "sum_doc_freq": 10882, "doc_count": 187, "sum_ttf": 17148 }, "terms": { "SPRN": { "term_freq": 1, "tokens": [ { "position": 0, "start_offset": 0, "end_offset": 6 } ] } } }, "spelling.whitespace": { "field_statistics": { "sum_doc_freq": 13532, "doc_count": 187, "sum_ttf": 17148 }, "terms": { "spring": { "term_freq": 1, "tokens": [ { "position": 0, "start_offset": 0, "end_offset": 6 } ] } } } } } => There is no "doc_count" for the term "spring" in term vector results. The question is now : why ? Here is the mapping of this attribute : "option_text_climate" : { "type" : "string", "analyzer" : "standard", "fielddata" : { "format" : "lazy" }, "fields" : { "shingle" : { "type" : "string", "analyzer" : "shingle", "fielddata" : { "format" : "lazy" } }, "untouched" : { "type" : "string", "index" : "not_analyzed", "fielddata" : { "format" : "doc_values" } }, "whitespace" : { "type" : "string", "analyzer" : "whitespace", "fielddata" : { "format" : "lazy" } } }, "copy_to" : [ "search" ] } Here is also an example of product in ES with this field : "option_text_climate": [ "Spring", "Windy" ], Which seems similar to other attributes like "color". And "blue hoodie" is working properly, also does the term vector query for "blue" or "blue hoodie" => is has doc count. WARNING : "blue hoodie" seems to be a false positive : "blue" is in the product description. => After removing description from the indexable fields, I have no results for "blue hoodie" !!! |
I think I got it. The term vector query is processed on the "spelling" field of the index. As seen above, problematic fields are NOT copied to "spelling". This is due to this piece of code : https://github.com/Smile-SA/elasticsuite/blob/master/src/module-elasticsuite-catalog/Model/Eav/Indexer/Fulltext/Datasource/AbstractAttributeData.php#L182 option's text attributes are arbitrary set to "is_used_in_spellcheck:false". Maybe we should consider using the value of the attribute they are related to. This should be also valid for other properties like "is_used_in_autocomplete" or even "is_searchable" which is forced to true even if we do not plan to search on this attribute. |
the PR has been merged. |
…-terms-recommendations Feat esp 306 search terms recommendations
Preconditions
Steps to reproduce
Expected result
Actual result
During the Search Autocomplete shows the new Product but if you Simply search the Attribute no products will be displayed. This issue only occurs when using the Multiple Select Attribute Option.
Proof of error I Recreated a Attribute using Text Field and entered text and that was searchable but when setting up a site filtering through text fields just isn't probable
Something is broken between the Displayed search and the autocomplete.
The text was updated successfully, but these errors were encountered: