PHP through the API to search ES after the discovery can only get 10 data, search statements as follows:
{ "Query": { "filtered": { " Query ": { " Query_string ": { "Query": "level:\" warning \ " and source_name:\" asp.net\ " ", "Analyze_wildcard": true } }, " Filter ": { " bool ": { "must": [ { "Range": { "@timestamp": { "GTE": 1494309300, " LTE ": 1494489299, "format": "Epoch_second" } } } ], "Must_ Not ": [] } } }}}
Other ES if no size is specified, the default is 10
Http://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.search
But size can not exceed 10000, otherwise it will be error.
Modify the search statement as follows:
{ "Size": 10000, "query": { "filtered": { "Query": { "query_string": { "Query": "level:\" warning \ " AND Source_name:\ "asp.net\" ", " Analyze_wildcard ": true } }, "filter": { "bool": { "must": [ { "Range": { "@timestamp": { "GTE": 1494309300, "LTE": 1494489299, "format": "Epoch_second" } } } ], "Must_not": [] } } }}}
Can
This article is from "Maple Night" blog, please be sure to keep this source http://fengwan.blog.51cto.com/508652/1924597
PHP searches through the API for Elasticsearch only 10 data