-
Notifications
You must be signed in to change notification settings - Fork 341
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
Elasticsuite 2.9 unable to load correct spelling type (ES 6.x) #1852
Comments
the solution is to add the type to the request since it is needed for ES 6.8.8.
the only problem that remains now is that this function is private, so we can´t modify its behavior via plugin :-( Any ideas how to tackle that without risking update problems? |
Hello @ahajji06, Edit: confirmed with Elasticsearch 6.8.3 The easiest way for you is to use a composer patch, using cweagans/composer-patches. In your case, for ES 6.8.x, the patch would be
On our side, we will have to find a satisfying approach for both ES 6 and ES 7. Regards, |
Hello @ahajji06, I've just checked, Elasticsearch 7.x still accepts the _doc parameter for termVectors even if it is not present in the documentation and the returned data, even if not strictly speaking the same (fields ordered differently), is consistent with or without the parameter that is required for Elasticsearch 6.x. Long story short, feel free to submit us a PR if you wish. Regards, |
Thank you 😊 |
Re-opening because we need to fix that for everyone :) |
…-type-parameter Fixes #1852 termVectors restoring type parameter
Preconditions
Magento Version : CE 2,3.5
Elasticsearch Version: 6.8.8
ElasticSuite Version : 2.9.0
Environment : Developer
Expected result
spelling type should be defined correctly
Actual result
It always returns: self::SPELLING_TYPE_EXACT
(from catch block in src/module-elasticsuite-core/Search/Adapter/Elasticsuite/Spellchecker.php)
Logs:
Request Failure: {"method":"POST","uri":"http://localhost/magento2_de_catalog_product/_termvectors?term_statistics=true&fields=spelling%2Cspelling.whitespace","port":9200,"headers":{"Host":["localhost"],"Content-Type":["application/json"],"Accept":["application/json"],"User-Agent":["elasticsearch-php/7.7.0 (Linux 4.19.0-9-amd64; PHP 7.3.19)"]},"HTTP code":400,"duration":0.000577,"error":"{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/magento2_de_catalog_product/_termvectors] contains unrecognized parameters: [fields], [term_statistics]"}],"type":"illegal_argument_exception","reason":"request [/magento2_de_catalog_product/_termvectors] contains unrecognized parameters: [fields], [term_statistics]"},"status":400}"} []
Response ["{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/magento2_de_catalog_product/_termvectors] contains unrecognized parameters: [fields], [term_statistics]"}],"type":"illegal_argument_exception","reason":"request [/magento2_de_catalog_product/_termvectors] contains unrecognized parameters: [fields], [term_statistics]"},"status":400}"] []
curl -XPOST 'http://localhost/magento2_de_catalog_product/_termvectors?term_statistics=true&fields=spelling%2Cspelling.whitespace' -d '{"doc":{"spelling":"fnster"}}' [] []
Any idea how i can fix that?
Thank you
The text was updated successfully, but these errors were encountered: