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

エンティティのコンテンツが長すぎて、設定されたバッファーの制限に達しています。

written-by

Cristina Rodriguez

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

問題

  • 以下のようなカスタム検索を実装すると:
    IndexSearcherHelperUtil.search(searchContext, query); 
    Elasticsearchから以下の例外がスローされ、 search.response 属性から結果が取得されません。
2023-03-07 11:53:04.136 ERROR [http-nio-8080-exec-72][ElasticsearchIndexSearcher:164] null
java.lang.RuntimeException: java.io.IOException: entity content is too long [155989434] for the configured buffer limit [104857600]
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl.getSearchResponse(SearchSearchRequestExecutorImpl.java:99) ~[?:?]
{...}
Caused by: org.apache.http.ContentTooLongException: entity content is too long [155989434] for the configured buffer limit [104857600]

環境

  • Liferay DXPとElasticsearch

解決

  • これは実装にあるように、Elasticsearch のバッファーの上限が 100MB に定義されており、結果が大きすぎて保存できないために起こります:
// default buffer limit is 100MB
static final int DEFAULT_BUFFER_LIMIT = 100 * 1024 * 1024;
  • バッファオーバーフローする可能性のある結果が多すぎるのを避けるには、groupId、companyId、またはエンティティのその他の特定の属性(articleIdなど)などのフィルターをクエリに追加してください。

追加情報

 

 

did-this-article-resolve-your-issue

legacy-knowledge-base