Elasticsearch查询match_all

时间:2017-02-09 10:14:27

标签: elasticsearch

我正在使用Elasticsearch 1.5.2。我有一个包含278个存储产品的索引。我检查它们是否存储在head plugin中。当运行match_all的查询时,我只得到10次点击,但总数是278.我得到了这个结果:

{
   "took": 3,
   "timed_out": false,
   "_shards": {
      "total": 5,
      "successful": 5,
      "failed": 0
   },
   "hits": {
      "total": 278,
      "max_score": 1,
      "hits": [.................only 10 products.......]

我希望我的所有278个结果都能得到点击。

1 个答案:

答案 0 :(得分:0)

您需要将size参数传递给您的查询,如下所示:

 POST /_search
 {
  "from" : 0, "size" : 300,
  "query" : {
      "match_all":{}
   }
 }

默认只有10个文件。

相关问题