我是第一次尝试弹性搜索。我只有一个节点和一个索引。
curl -XPUT http://localhost:9200/testing/dummy/1 -d '{
"snapshotTime" : "2012-10-31T13:31:21",
"ratio" : "50",
"description" : "sample description"
}'我已经索引了500个这样的虚拟人来索引“测试”。
http://localhost:9200/testing/dummy/1。。。。
http://localhost:9200/testing/dummy/500现在,当我尝试对此数据集进行matchAll查询时,
curl -XGET 'http://localhost:9202/_all/_search?pretty=true' -d '
{
"query" : {
"matchAll" : {}
}
}'我只得到了10个结果,而且每次都是随机的。然而,总点击量仍然是500次。命中数组只包含10个条目。我是不是遗漏了什么?
发布于 2012-11-07 03:33:16
我从elastic search用户邮件列表中得到了答案。(制片人: Radu Gheorghe) http://www.elasticsearch.org/guide/reference/api/search/from-size.html
搜索API中的from/size允许控制结果集的大小。
发布于 2014-04-09 10:36:10
http://127.0.0.1:9200/foo/_search/?size=1000&pretty=1
请注意大小param,它将显示的点击数从默认值(10)增加到1000。
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-from-size.html
https://stackoverflow.com/questions/13257952
复制相似问题