python - How to specify meta parameters in search query -
i using elasticsearch 2.2 , corresponding python api. can query like
res = es.search(index="test-index", body={"query": {"match_all": {}}}) that good. there meta parameters can specify query, shown on
so basically, want execute query like
url = 'http://localhost:9200/tesindex/test/_search?from=%d&q=fielda=abc or fielda=pqr'%start result = requests.get(url).json() how specify query using elasticsearch python api?
you pass them keyword parameters:
res = es.search(index="test-index", body={"query": {"match_all": {}}}, from_=20, size=100, _source=false) reference: http://elasticsearch-py.readthedocs.org/en/2.2.0/api.html#elasticsearch.elasticsearch.search
Comments
Post a Comment