je tente d'accéder 10 du terme le plus courant dans mon index en faisant:ElasticSearch: trop de tessons
POST _search/
{
"size":0,
"aggs":{
"top-terms-aggregation":{
"terms":{
"field":"author_wording",
"size":10
}
}
}
}
Mais je reçois l'erreur suivante:
{
"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."
}
Le problème est que je n'a pas configuré autant de fragment. Dans mon index, je n'ai qu'un seul fragment défini dans mes paramètres:
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
}
D'où cette erreur provient-elle? Comment puis-je réduire mon nombre de fragments?
Il suffit d'ajouter le nom d'index avant '_search' comme'/my_index/_search' sinon vous êtes à la recherche sur tous les indices – Val