• Resolved flaviopv

    (@flaviusv)


    Hi,

    we installed ES and WPSOLR on our VDS server, indexed the content as from your documentation, and we have a bunch of repeted errors which we don’t know how to handle:

    1.index disappeared. We indexed all the content, 299k posts, after 2-3 days when accessing /wp-admin/admin.php?page=solr_settings&tab=solr_operations an error message appears, the indexed dissapeared, and an error message appears:

    Please check your hosting, an exception occured while calling your search server:404 Not Found: {“error”:(“root_cause”:K”type” “index_ not_found exception”, “reason”:”no such index [xxxsearch]”, “resource.type”. “index_or_alias”, “resource. id”. “/xxxsearch”,”index_uuid”.” na“,”index”.”/xxxsearch”‘], “type”: “index_not fou such index [xxxsearch]” “resource.type”. “index_or_alias”, “resource.id”:”/xxxsearch”, “index_uuid”:” na” “index”: “/xxxsearch”,”status”:404}

    After few page refreshes, then, we got this information:

    “A total of 273 documents are currently in your index “elasticindex”. 143 Articole not indexed yet. Click on the button “synchronize” to index them.”

    2.in frontend we got some error messages when searching by some single keywords, and other by multiple keywords:

    Uncaught Exception: The length [2489481] of field [content] in doc[253]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them.
    in /home/xxx/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/classes/engines/elasticsearch_php/class-wpsolr-resultselasticsearchclient.php on line 25

    OR

    Uncaught Exception: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The length [1294515] of field [content] in doc[113]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them."},{"type":"illegal_argument_exception","reason":"The length [2489481] of field [content] in doc[253]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"fetch","grouped":true,"failed_shards":[{"shard":0,"index":"xxxsearch","node":"cmhiE1uoQVW3RJigQ_Q2lg","reason":{"type":"illegal_argument_exception","reason":"The length [1294515] of field [content] in doc[113]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them."}},{"shard":1,"index":"xxxsearch","node":"cmhiE1uoQVW3RJigQ_Q2lg","reason":{"type":"illegal_argument_exception","reason":"The length [2489481] of field [content] in doc[253]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them."}}],"caused_by":{"type":"illegal_argument_exception","reason":"The length [1294515] of field [content] in doc[113]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them.","caused_by":{"type":"illegal_argument_exception","reason":"The length [1294515] of field [content] in doc[113]/index[xxxsearch] exceeds the [index.highlight.max_analyzed_offset] limit [1000000]. To avoid this error, set the query parameter [max_analyzed_offset] to a value less than index setting [1000000] and this will tolerate long field values by truncating them."}}},"status":400}
    in /home/xxx/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Response/Elasticsearch.php on line 68

    The server logs is this:

    [root@server elasticsearch]# cat my-application.log
    [2025-04-2801:23:00, 000] [INFO ][o.e.x.m.MlDailyMaintenanceService] [node-1] triggering scheduled [ML] maintenance tasks
    [2025-04-2801:23:00, 008] [INFO ][o.e.x.m.a. TransportDeleteExpiredDataAction] [node-1] Deleting expired data [2025-04-2801:23:00, 012] [INFO ][o.ex.m.j.r.UnusedStatsRemover] [node-1] Successfully deleted [0] unused stats documents [2025-04-28T01:23:00, 012] [INFO ][o.e.x.m.a. TransportDeleteExpiredDataAction] [node-1] Completed deletion of expired ML data
    [2025-04-28T01:23:00, 013] [INFO ][o.e.x.m.MlDailyMaintenanceService] [node-1] Successfully completed [ML] maintenance task: triggerDeleteExpiredDataTask
    [2025-04-2804:30:00, 000] [INFO J[o.e.x.s.SnapshotRetentionTask] [node-1] starting SLM retention snapshot cleanup task
    [2025-04-2804: 30: 00, 001] [INFO ][o.e.x.s.SnapshotRetentionTask] [node-1] there are no repositories to fetch, SLM retention snapshot cleanup task complete [2025-04-28T05:29:52, 538] [INFO ][o.e.c.m.MetadataCreateIndexService] [node-1] [xxxsearch] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
    [2025-04-28T05:29:52, 607] [INFO ][o.e.c.m.MetadataMappingService] [node-1] [xxxsearch/EJUsQUbgT8etrOmfhuPYAg] create_mapping

    Previously, with other indexes we got these errors:

    Uncaught Exception: 404 Not Found: {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [elasticsearch]","resource.type":"index_or_alias","resource.id":"elasticsearch","index_uuid":"_na_","index":"elasticsearch"}],"type":"index_not_found_exception","reason":"no such index [elasticsearch]","resource.type":"index_or_alias","resource.id":"elasticsearch","index_uuid":"_na_","index":"elasticsearch"},"status":404}
    in /home/xxx/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Response/Elasticsearch.php on line 68

    OR

    Uncaught Exception: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"no mapping found for field [spell]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"lex24_index","node":"cmhiE1uoQVW3RJigQ_Q2lg","reason":{"type":"illegal_argument_exception","reason":"no mapping found for field [spell]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [spell]","caused_by":{"type":"illegal_argument_exception","reason":"no mapping found for field [spell]"}}},"status":400}
    in /home/xxx/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Response/Elasticsearch.php on line 68

    OR

    Uncaught Exception: 400 Bad Request: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on [type] in [xxx_index]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [type] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"xxx_index","node":"cmhiE1uoQVW3RJigQ_Q2lg","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on [type] in [lex24_index]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [type] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on [type] in [xxx_index]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [type] in order to load field data by uninverting the inverted index. Note that this can use significant memory.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on [type] in [xxx_index]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [type] in order to load field data by uninverting the inverted index. Note that this can use significant memory."}}},"status":400}
    in /home/xxx/public_html/wp-content/plugins/wpsolr-free/wpsolr/core/vendor/elasticsearch/elasticsearch/src/Response/Elasticsearch.php on line 68

    Basically, we cannot manage the index in ES throught WPSOLR, if you kindly give us a hand please.

    Many thanks,

    F.

    • This topic was modified 1 year, 1 month ago by flaviopv.
    • This topic was modified 1 year, 1 month ago by flaviopv.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WPSOLR

    (@wpsolr)

    Hi Flavius,

    1. Index Disappeared – “Index Not Found” Error

    Cause:
    This typically occurs when the Elasticsearch index was deleted (manually, automatically by retention settings, or due to storage issues).

    Solution:

    • Recreate the index from WPSOLR, then reindex from “Synchronize with index”.
    • Ensure your Elasticsearch instance is not restarting or clearing indices, and there’s enough disk space and memory.
    • If you’re using a VDS, check if there’s any cronjob or backup process that might be removing old indices.
    Plugin Author WPSOLR

    (@wpsolr)

    2. Search Error: max_analyzed_offset Exceeded

    Cause:
    Elasticsearch has a default limit of 1,000,000 characters for highlighted fields. One of your posts has a very large content field (over 2 million characters), which triggers this.

    Solution:

    • Option B: Increase Limit in Elasticsearch Increase the limit by updating the index settings in the Kibana dev tool:
    • PUT /xxxsearch/_settings { "index.highlight.max_analyzed_offset": 5000000 } This allows longer fields to be highlighted but may affect performance.
    Plugin Author WPSOLR

    (@wpsolr)

    3. “No Mapping Found for Field” / “Fielddata is Disabled” Errors

    These are related to field configurations in your Elasticsearch mappings.

    Solutions:

    • “No mapping found for field [spell]” → This suggests WPSOLR or a query is looking for a non-existent field. Ensure the field spell is enabled in your WPSOLR search schema or remove it from the query.
    • “Fielddata is disabled” → Elasticsearch does not allow sorting/aggregations on text fields by default.

      Fix: the index was probably created outside of WPSOLR. Please create the index in WPSOLR first, then index.
    Plugin Author WPSOLR

    (@wpsolr)

    (deleted)

    Thread Starter flaviopv

    (@flaviusv)

    Dear Alexander,

    thank you for your kind support.

    As we have no experience with ES, I am thinking if we could work with you to help us properly set Elasticsearch with WPSOLR, check the current instalment, and set things up for good.

    Basically we need to hava e fully functional search by one keyword, by multiple keywords, facets (our ideal is to have it work like the jetpack search).

    Plugin Author WPSOLR

    (@wpsolr)

    Dear @flaviusv,

    I appreciate your interest in using WPSOLR.

    While we’re glad to support your efforts, please note that with the WPSOLR Free version, we unfortunately do not offer assistance with setting up or troubleshooting Elasticsearch servers, nor do we provide in-depth configuration support. This is primarily due to the technical complexity involved in properly managing a local Elasticsearch installation.

    Patrice

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Index disappear and search errors’ is closed to new replies.