Loading...
 
Skip to main content

Error while rebuilding index using elasticSearch after upgrade

Status
Closed
Subject
Error while rebuilding index using elasticSearch after upgrade
Version
22.x
Category
  • Error
Feature
Search
Resolution status
Works For Me
Submitted by
Bernard Sfez / Tiki Specialist
Keep informed
Jonny Bradley
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

I upgraded a Tiki21 (Tiki created somewhere Tiki16/17) to Tiki22 and started to use elasticSearch. (it is possible somewhere in the past elasticSearch was used once).

I have errors with the elasticSearch not being found while it recreate one for each index rebuilt

Using the shell (fallback is not working):

Copy to clipboard
bernardsfez@server001:~/public_html$ php console.php i:r -p --log [15/10/2020 09:12] Started rebuilding index... logging to file: /tmp/Search_Indexer_elastic_bernardsfez_console.log Unified search -------------- Engine: Elastic, version 7.9 < 1 sec/< 1 sec [>---------------------------] -- Rebuilding... In Connection.php line 568: no such index [bernardsfez_main_5f87e83d6e0c7] index:rebuild [--log] [--cron] [-p|--progress] bernardsfez@server001:~/public_html$ php console.php i:r -p --log [15/10/2020 09:12] Started rebuilding index... logging to file: /tmp/Search_Indexer_elastic_bernardsfez_console.log Unified search -------------- Engine: Elastic, version 7.9 < 1 sec/< 1 sec [>---------------------------] -- Rebuilding... In Connection.php line 568: no such index [bernardsfez_main_5f87e8502c33a] index:rebuild [--log] [--cron] [-p|--progress] bernardsfez@server001:~/public_html$ php console.php i:r -p --log [15/10/2020 09:12] Started rebuilding index... logging to file: /tmp/Search_Indexer_elastic_bernardsfez_console.log Unified search -------------- Engine: Elastic, version 7.9 < 1 sec/< 1 sec [>---------------------------] -- Rebuilding... In Connection.php line 568: no such index [bernardsfez_main_5f87e855170e6] index:rebuild [--log] [--cron] [-p|--progress] bernardsfez@server001:~/public_html$ php console.php i:r -p --log [15/10/2020 09:12] Started rebuilding index... logging to file: /tmp/Search_Indexer_elastic_bernardsfez_console.log Unified search -------------- Engine: Elastic, version 7.9 < 1 sec/< 1 sec [>---------------------------] -- Rebuilding... In Connection.php line 568: no such index [bernardsfez_main_5f87e857ac63c] index:rebuild [--log] [--cron] [-p|--progress]


If I use the web interface I have a different warning (no error but it may use the fallback):

Copy to clipboard
Warning Elasticsearch does not support optimize. Rebuild Index Your index was last fully rebuilt on Thursday 15 October, 2020 09:12:58. Unified search engine: Elastic, version 7.9, index bernardsfez_main_5f87e86a73dfb Unified search engine fallback: MySQL, version 10.3.23-MariaDB-0+deb10u1, index index_5f87e86c95c36 Indexed trackeritem: 97 tracker: 11 trackerfield: 72 blog post: 3 article: 50 file: 218 file gallery: 18 comment: 6 user: 7 group: 8 wiki page: 39 category: 19 Fallback search engine Fallback search index was rebuild. Execution Statistics Execution time: 4 secs Current Memory usage: 13.3 MiB Memory peak usage before indexing: 2.8 MiB Memory peak usage after indexing: 15.2 MiB Number of queries: 14088

On Tiki admin search page I see:

Copy to clipboard
Client Node: server001 Elasticsearch Version: 7.9.2 Lucene Version: 8.6.2 Cluster Name: elasticsearch Cluster Status: yellow Cluster Node Count: 1 Index bernardsfez_pref_en: 2374 documents, totaling 1,486,770 bytes Index bernardsfez_main_5f87e86a73dfb: 548 documents, totaling 1,662,738 bytes Node server001: Using 733,190,144 bytes, since 2020-10-15 09:33:10 Field Count Tried on Last Rebuild: 184

But the field "Elasticsearch current index" show a different index being used "bernardsfez_main_5f87ece0dd927". I keep reseting this field to the default (empty) but index id keep coming-in.

I tried to set this field value to "bernardsfez_main_5f87e86a73dfb" (as displayed in the elasticSearch node info but after a new rebuilt it is changed again.

Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7573
Created
Thursday 15 October, 2020 06:40:36 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Tuesday 31 August, 2021 13:36:57 UTC


Show PHP error messages