Elasticsearch:碎片太多

2024-05-14 21:43:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试通过以下方式访问索引中最常见的10个术语:

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

但我得到了以下错误:

^{pr2}$

问题是我没有配置那么多碎片。在我的索引中,我的设置中只定义了一个碎片:

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

这个错误从何而来?如何减少碎片数量?在


Tags: ofnumberfieldsearchsizetop错误方式

热门问题