legacy-knowledge-base
公開されました Jun. 30, 2025

Elasticsearchの高価なクエリを無効にすると、Liferayで検索の問題が発生することがあります。

written-by

Christopher Lui

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

デフォルトでは、Elasticsearch は search.allow_expensive_queries を true に設定します。 しかし、これをfalseに設定すると、コンテンツを検索できなかったり、Liferay Search Blueprintsが機能しないという問題が発生する可能性があります。
のようなエラーが表示されるかもしれません:

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

解決策

search.allow_expensive_queries をtrueのままにしておく。 こうすることで、Elasticsearchは、 Date Mathのような、より複雑なクエリを実行できるようになります。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base