aparo / pyes

Python connector for ElasticSearch - the pythonic way to use ElasticSearch
BSD 3-Clause "New" or "Revised" License
607 stars 270 forks source link

TopChildrenQuery cannot use queries #477

Closed MasterMind2k closed 9 years ago

MasterMind2k commented 9 years ago

Replaced 'filters' with 'queries' inside _serialize, parent class ConstantScoreQuery adds queries into 'queries' not 'filters'.

Without this commit, the (probably) ordinary query:

q = TopChildrenQuery('my_type') q.add(MatchAllQuery())

throws QueryParsingException[[****] [_na] query malformed, no field after start_object];