Smile-SA / elasticsuite

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

llegal_argument_exception: Alias ... has more than one indices associated with it #95

Closed phronesis closed 8 years ago

phronesis commented 8 years ago

Error: illegal_argument_exception: Alias [magento2_blue_eng_thesaurus] has more than one indices associated with it [[magento2_blue_eng_thesaurus_20160815_085616, magento2_blue_eng_thesaurus_20160811_161751]], can't execute a single index op

Trace:

0 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(632): Elasticsearch\Connections\Connection->tryDeserializeError(Array, 'Elasticsearch\C...')

1 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(553): Elasticsearch\Connections\Connection->tryDeserialize400Error(Array)

2 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(262): Elasticsearch\Connections\Connection->process4xxError(Array, Array, Array)

3 /var/www/releases/d-N318X92ZG/vendor/react/promise/src/FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array)

4 /var/www/releases/d-N318X92ZG/vendor/guzzlehttp/ringphp/src/Future/CompletedFutureValue.php(55): React\Promise\FulfilledPromise->then(Object(Closure), NULL, NULL)

5 /var/www/releases/d-N318X92ZG/vendor/guzzlehttp/ringphp/src/Core.php(341): GuzzleHttp\Ring\Future\CompletedFutureValue->then(Object(Closure), NULL, NULL)

6 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(283): GuzzleHttp\Ring\Core::proxy(Object(GuzzleHttp\Ring\Future\CompletedFutureArray), Object(Closure))

7 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php(159): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array, Object(Elasticsearch\Connections\Connection), Object(Elasticsearch\Transport), Array)

8 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php(99): Elasticsearch\Connections\Connection->performRequest('GET', '/magento2blue...', Array, NULL, Array, Object(Elasticsearch\Transport))

9 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/AbstractEndpoint.php(79): Elasticsearch\Transport->performRequest('GET', '/magento2blue...', Array, NULL, Array)

10 /var/www/releases/d-N318X92ZG/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/IndicesNamespace.php(957): Elasticsearch\Endpoints\AbstractEndpoint->performRequest()

11 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Model/Index.php(136): Elasticsearch\Namespaces\IndicesNamespace->analyze(Array)

12 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Model/Index.php(90): Smile\ElasticsuiteThesaurus\Model\Index->getSynonymRewrites(4, 'rice', 'synonym')

13 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-thesaurus/Plugin/QueryRewrite.php(97): Smile\ElasticsuiteThesaurus\Model\Index->getQueryRewrites(Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), 'rice')

14 [internal function]: Smile\ElasticsuiteThesaurus\Plugin\QueryRewrite->aroundCreate(Object(Smile\ElasticsuiteCore\Search\Request\Query\Fulltext\QueryBuilder\Interceptor), Object(Closure), Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), Array, 1)

15 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)

16 /var/www/releases/d-N318X92ZG/var/generation/Smile/ElasticsuiteCore/Search/Request/Query/Fulltext/QueryBuilder/Interceptor.php(27): Smile\ElasticsuiteCore\Search\Request\Query\Fulltext\QueryBuilder\Interceptor->___callPlugins('create', Array, Array)

17 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Query/Builder.php(84): Smile\ElasticsuiteCore\Search\Request\Query\Fulltext\QueryBuilder\Interceptor->create(Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), Array, 1)

18 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-core/Search/Request/Builder.php(155): Smile\ElasticsuiteCore\Search\Request\Query\Builder->createQuery(Object(Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration), Array, Array, 1)

19 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(470): Smile\ElasticsuiteCore\Search\Request\Builder->create(4, 'catalog_view_co...', 0, 5, Array, Array, Array, Array, Array)

20 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(367): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->prepareRequest()

21 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Data/Collection/AbstractDb.php(331): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->_renderFiltersBefore()

22 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/ResourceModel/Product/Fulltext/Collection.php(403): Magento\Framework\Data\Collection\AbstractDb->_renderFilters()

23 /var/www/releases/d-N318X92ZG/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php(906): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->_renderFilters()

24 /var/www/releases/d-N318X92ZG/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php(719): Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false)

25 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Data/Collection.php(820): Magento\Catalog\Model\ResourceModel\Product\Collection->load()

26 /var/www/releases/d-N318X92ZG/vendor/smile/elasticsuite/src/module-elasticsuite-catalog/Model/Autocomplete/Product/DataProvider.php(112): Magento\Framework\Data\Collection->getIterator()

27 /var/www/releases/d-N318X92ZG/vendor/magento/module-search/Model/Autocomplete.php(32): Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\DataProvider->getItems()

28 /var/www/releases/d-N318X92ZG/vendor/magento/module-search/Controller/Ajax/Suggest.php(44): Magento\Search\Model\Autocomplete->getItems()

29 /var/www/releases/d-N318X92ZG/var/generation/Magento/Search/Controller/Ajax/Suggest/Interceptor.php(24): Magento\Search\Controller\Ajax\Suggest->execute()

30 /var/www/releases/d-N318X92ZG/vendor/magento/framework/App/Action/Action.php(102): Magento\Search\Controller\Ajax\Suggest\Interceptor->execute()

31 [internal function]: Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))

32 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)

33 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Search\Controller\Ajax\Suggest\Interceptor->___callParent('dispatch', Array)

34 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Search...', 'dispatch', Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Array, 'designLoader')

35 /var/www/releases/d-N318X92ZG/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

36 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

37 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

38 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Search...', 'dispatch', Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Array, 'contextPlugin')

39 /var/www/releases/d-N318X92ZG/vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

40 [internal function]: Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

41 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

42 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Search...', 'dispatch', Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Array, 'customer-app-ac...')

43 /var/www/releases/d-N318X92ZG/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

44 [internal function]: Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

45 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

46 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Search...', 'dispatch', Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Array, 'storeCheck')

47 /var/www/releases/d-N318X92ZG/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

48 [internal function]: Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

49 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

50 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Search...', 'dispatch', Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Array, 'weee-app-action...')

51 /var/www/releases/d-N318X92ZG/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

52 [internal function]: Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

53 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

54 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Search...', 'dispatch', Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Array, 'tax-app-action-...')

55 /var/www/releases/d-N318X92ZG/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Search\Controller\Ajax\Suggest\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

56 [internal function]: Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Search\Controller\Ajax\Suggest\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

57 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)

58 /var/www/releases/d-N318X92ZG/var/generation/Magento/Search/Controller/Ajax/Suggest/Interceptor.php(39): Magento\Search\Controller\Ajax\Suggest\Interceptor->___callPlugins('dispatch', Array, Array)

59 /var/www/releases/d-N318X92ZG/vendor/magento/framework/App/FrontController.php(55): Magento\Search\Controller\Ajax\Suggest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

60 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))

61 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)

62 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)

63 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')

64 /var/www/releases/d-N318X92ZG/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(89): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

65 [internal function]: Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

66 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

67 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')

68 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

69 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

70 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

71 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')

72 /var/www/releases/d-N318X92ZG/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Request\Http))

73 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

74 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)

75 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')

76 /var/www/releases/d-N318X92ZG/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(68): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))

77 [internal function]: Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))

78 /var/www/releases/d-N318X92ZG/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)

79 /var/www/releases/d-N318X92ZG/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)

80 /var/www/releases/d-N318X92ZG/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))

81 /var/www/releases/d-N318X92ZG/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()

82 /var/www/releases/d-N318X92ZG/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))

83 {main}

romainruaud commented 8 years ago

Hello,

I would like to know which version of Magento/ElasticSuite you are using.

It sounds like there are several thesaurus indexes with the same alias, which should not happen (old index is deleted at the end of reindex process, and alias is given to the new index immediately after).

Did you experience any failures during previous indexation processes ?

romainruaud commented 8 years ago

Hello @phronesis , any update ?

phronesis commented 8 years ago

Sorry about not responding before now. I am running off AWS ec2 and using autoscaling. For some reason , I used the same cluster for both staging and live environment. I changed that and it worked. Just to be extra cautious, I also renamed the index name for staging.

Thanks

On Tue, Sep 13, 2016 at 12:16 PM, Romain Ruaud notifications@github.com wrote:

Hello @phronesis https://github.com/phronesis , any update ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Smile-SA/elasticsuite/issues/95#issuecomment-246650180, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtGF7qk3-OHaQvsuyDV6f6ScL7PotUoks5qpoYjgaJpZM4JkitL .

romainruaud commented 8 years ago

Fine then I close this issue. Do not hesitate to reopen it if you have any other question about it.

Regards.