Loading...
 
Skip to main content

ElasticSearch, Indexing; The indexing should first check the search engine is running and throw an error if not

Status
Open
Subject
ElasticSearch, Indexing; The indexing should first check the search engine is running and throw an error if not
Version
24.x
Category
  • Bug
  • Consistency
Feature
Console / Command Line
Search
Resolution status
New
Submitted by
Bernard Sfez / Tiki Specialist
Lastmod by
Bernard Sfez / Tiki Specialist
Rating
(0)
Description

On a Tiki24 using ElasticSearch(7.x), using the console I recreate the index.
It fails after several minutes with the following error:

Copy to clipboard
php console.php i:r -p [2023-04-04 08:39] Started rebuilding index... Unified search -------------- Engine: Elastic 1 min/1 min [====================>-------] -- Processing activity documentsA error was encountered while running a command Argument 1 passed to Search_Type_Json::__construct() must be of the type array, string given, called in /Users/bernardsfez/Documents/Shocksite/www/htdocs/wiki-to-yes.org_tiki24/lib/core/Search/Elastic/TypeFactory.php on line 81 on line 13 of /Users/xxx/xxx/xxx/www/htdocs/xxx_tiki24/lib/core/Search/Type/Json.php

The error may be or may be not related to the fact that EalsticSearch is not running... that's not the point of the ticket.


When I login as admin I can see that ElasticSearch is visibly not running. ?
(this error too could be improved, connection is not "just" refused, Elasticsearch is not running at all)

Copy to clipboard
Search index failure Unable to connect to localhost:9200 . Error #0: stream_socket_client(): unable to connect to localhost:9200 (Connection refused)


After starting Elasticsearch service on the server everything is back to normal.

Prior to indexing (or any operation that involve the search engine) there should be a check it is running and if not an appropriate message should be displayed. (with or without fallback set).

Importance
3
Easy to solve?
5
Priority
15
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8372
Created
Tuesday 04 April, 2023 07:03:49 UTC
by Bernard Sfez / Tiki Specialist
LastModif
Tuesday 04 April, 2023 07:07:46 UTC


Show PHP error messages