Issue
By default, Elasticsearch sets search.allow_expensive_queries
to true. However, if you set it to false, it can cause issues with not being able to search for any content or Liferay Search Blueprints not working.
You may see errors like:
java.lang.RuntimeException: org.elasticsearch.ElasticsearchStatusException: ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]; nested: ElasticsearchException[Elasticsearch exception [type=exception, reason=[joining] queries cannot be executed when 'search.allow_expensive_queries' is set to false.]];
Environment
- Elasticsearch
- Liferay 7.0-7.4
Resolution
Leave search.allow_expensive_queries
as true. This way, Elasticsearch will be able to perform more complex queries, such as Date Math.
Additional Information
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión