-
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
Undefined index: tokens on line 227 module-elasticsuite-thesaurus/Model/Index.php #1165
Comments
A very crude |
Well, seems kinda strange especially when I see the line just above this one : try {
$analysis = $this->client->analyze(
['index' => $indexName, 'body' => ['text' => $queryText, 'analyzer' => $type]]
);
} catch (\Exception $e) {
$analysis = ['tokens' => []];
} This would mean that we had a successful response of Are you able to reproduce this one easily ? I'm curious about what is actually being returned in the |
It was happening on virtually every search request until I added my change. We saw the same result whether or not there were Thesaurus entries. I should be able to reproduce easily, if you can let me know the best format / way to send you a log or print and what you'd want to see? |
I received your log, but I'm more interested by a In any cases, PR #1176 will fix the issue and is scheduled to be released on monday with the new minor version. |
Fixed by PR #1176 that will be part of next minor release. I close |
Preconditions
Magento Version : CE 2.2.6
ElasticSuite Version : 2.6
Environment : Production
Third party modules :
Steps to reproduce
Expected result
Actual result
Notice: Undefined index: tokens in [webroot]/app\/vendor\/smile\/elasticsuite\/src\/module-elasticsuite-thesaurus\/Model\/Index.php on line 227"
This is the line
foreach ($analysis['tokens'] as $token) {
This happens for multiple users, from multiple different browsers including 'private browsing', however it only happens occasionally (maybe 1 in 10 searches). We're using Elastic Cloud - no errors or warnings shown.
The text was updated successfully, but these errors were encountered: