私はelasticsearch-rails gemを使用しています。Ruby on Rails - ElasticSearch Resultウィンドウが大きすぎます
ページ区切りの上位ページ番号のリンクをクリックすると、次のエラーが表示されます。ここにエラーがあります:
Elasticsearch::Transport::Transport::Errors::InternalServerError ([500] {"error":{"root_cause":[{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [48700]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"products","node":"fNcaDjwzRRGu2fq0KjTWUQ","reason":{"type":"query_phase_execution_exception","reason":"Result window is too large, from + size must be less than or equal to: [10000] but was [48700]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."}}]},"status":500}):
ここで私はindex.max_result_windowを設定しますか、これはこの問題を解決する正しい方法ですか?
[Elasticsearch 2.1:結果ウィンドウが大きすぎます(index.max \ _result \ _window)]の重複している可能性があります(https://stackoverflow.com/questions/35206409/elasticsearch-2-1-result-window-is- too-large-index-max-result-window) –
@ThomasEdwards私はelasticsearch-restの宝石ではなく、elasticsearch-railsの宝石を使用しています。 –
ああ、https://medium.com/@thecolorfulcrayon/configuring-elasticsearch-on-rails-8bcbe973e9e7は、app/config/initializersでelasticsearch.rbを作成し、そこに設定を提案しています –