2017-02-11 3 views
0
私が行って、私の指数で最も一般的な用語の10にアクセスしよう

Elasticsearch:あまりにも多くの破片

POST _search/ 
{ 
    "size":0, 
    "aggs":{ 
    "top-terms-aggregation":{ 
     "terms":{ 
      "field":"author_wording", 
      "size":10 
     } 
    } 
    } 
} 

をしかし、私は次のエラーを取得する:

{ 
    "type": "illegal_argument_exception", 
    "reason": "Trying to query 1157 shards, which is over the limit of 1000. This limit exists because querying many shards at the same time can make the job of the coordinating node very CPU and/or memory intensive. It is usually a better idea to have a smaller number of larger shards. Update [action.search.shard_count.limit] to a greater value if you really want to query that many shards at the same time." 
    } 

問題は、Iその多くの断片を構成していませんでした。私の索引では、私の設定で定義されているシャードは1つだけです:

"index" : { 
    "number_of_shards" : 1, 
    "number_of_replicas" : 0 
} 

このエラーの原因はどこですか?どうすれば私のシャード数を減らすことができますか?あなたは猫のAPIを使用することができ破片んされているかについて骨董場合

+2

ちょうど '/ my_index/_search'よう_search''前に、インデックス名を追加しますそうしないと、すべてのインデックスを超える検索している – Val

答えて

1

は:

GET /_cat/shards 
+0

2を除くすべてが割り当てられていません。どのようにそれらを終了できますか? – mel

+0

シャードとインデックスだけを削除することはできません。 インデックス全体を削除するには、次のようにします。 DELETE/indexName – MosheZada

関連する問題