質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Elasticsearch

Elasticsearchは、クラウド向けに構築された、RESTful な API を提供する分散型のサーチエンジンアプリケーションです。

Q&A

解決済

2回答

12365閲覧

Elasticsearchでmax_result_windowを10000件以上に設定したい

yamada3

総合スコア14

Elasticsearch

Elasticsearchは、クラウド向けに構築された、RESTful な API を提供する分散型のサーチエンジンアプリケーションです。

0グッド

0クリップ

投稿2016/08/23 18:05

Railsでsearchkickを使っているのですが10000件以上で検索するためにmax_result_windowを設定しようと以下のコードをmodelに追加しました。

searchkick settings: {index: {max_result_window: 12000}}

しかしながら,結局以下のようなエラーが出てしまっています.

error

1{ 2 "error": { 3 "failed_shards": [ 4 { 5 "index": "", 6 "node": "", 7 "reason": { 8 "reason": "Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. 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 parameter.", 9 "type": "query_phase_execution_exception" 10 }, 11 "shard": 0 12 } 13 ], 14 "grouped": true, 15 "phase": "query_fetch", 16 "reason": "all shards failed", 17 "root_cause": [ 18 { 19 "reason": "Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. 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 parameter.", 20 "type": "query_phase_execution_exception" 21 } 22 ], 23 "type": "search_phase_execution_exception" 24 }, 25 "status": 500 26}

よろしくお願い致します.

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答2

0

herokuを使っていたのですがSearchBox ElasticsearchからBonsai Elasticsearchに変更したところ普通に動きました。
もしかしたらKibanaの設定が関係しているのかもしれません。

投稿2016/09/08 15:29

yamada3

総合スコア14

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

ベストアンサー

私の場合、その手の警告文がでる場合
以下の対策をとる

  1. ライブラリを改変(非推奨)
  2. 1000件検索を10回以上行い擬似的に対応する
  3. 諦める

どれにしろ10000件はメモリを食い潰しますからなぜ必要なのかを考え直した方が良いかもしれません

投稿2016/08/23 23:16

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問