IndexMissingException rebuilding Elasticsearch index (was RE: IndexMissingException rebuilding search index)
"Cloutier, Philippe (DGARI-Consultant)" <Philippe.Cloutier.externe-3LJ5X92lM5eafr9EPe0ZzS/[email protected]>
| Newsgroups | gmane.comp.cms.tiki.user |
|---|---|
| Message-ID | <F2DE8896807BF045932776107E2E783D3505C154__42659.3582066291$1513195885$gmane$org@CT20SEXCHP02.FONCIERQC.INTRA> |
Hi,
I finally figured out the problem here. The basic issue was quite trivial in the end. I had set "dpssPC" as index prefix, and it turns out that Elasticsearch index names must be fully lowercase. Trying to create an index with uppercase letters results in an exception (version 1.7.6):
$ curl -XPUT 'http://localhost:9200/dpssPC_main_5a31536e99e1d/'
{"error":"InvalidIndexNameException[[dpssPC_main_5a31536e99e1d] Invalid index name [dpssPC_main_5a31536e99e1d], must be lowercase]","status":400}
Which means there are probably 2 issues :
1. The interface lets admins enter invalid prefixes.
2. Our Elasticsearch backend must assume index creation works without verifying. Later, some code has unfulfilled expectations and fails with the unspecific error message "IndexMissingException", instead of an earlier failure with a specific message ("InvalidIndexNameException" in this case).
> -----Message d'origine-----
> De : Cloutier, Philippe (DGARI-Consultant)
> Envoyé : 19 septembre 2017 13:49
> À : 'tikiwiki-users-TtF/[email protected]' <tikiwiki-users-TtF/[email protected]>
> Objet : IndexMissingException rebuilding search index
>
> Hi,
> I am copying a Tiki 15 instance using ElasticSearch from a server to my desktop to ease debugging. I
> want to use the same ElasticSearch server, but a different index, so I changed the ElasticSearch index
> prefix in the search control panel. After that, I tried rebuilding the search indices, but index:rebuild
> fails on my desktop:
>
> C:\xampp\htdocs\tiki\dpss>php console.php index:rebuild
> Started rebuilding index...
>
>
>
> [Search_Elastic_Exception]
> IndexMissingException[[dpssPC_main_59c14e3de31b0] missing]
>
>
> Am I missing something or is this a bug? And if it's a bug, was this fixed? If not, is the bug not reported?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot