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
Conteúdo Excluesivo para Assinantes
Uma Subscrição do Liferay Enterprise fornece acesso a mais de 1.500 artigos que incluem práticas recomendadas, solução de problemas e outras soluções valiosas. Faça login para obter acesso completo.
Entrar