Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add support for _all in text/text_phrase/match/match_phrase queries #128

willkg opened this Issue Apr 18, 2013 · 2 comments


None yet
2 participants

willkg commented Apr 18, 2013

Currently you can specify a field with text/text_phrase/match/match_phrase queries:

s = S().query(foo__match='bar')

creates the query clause:

query: {
    {'match': {'foo': 'bar'}}

However, Elasticsearch allows you to use _all which will search all the fields.

Two possible ways we could do this off the top of my head.

Possibility 1:

s = S().query(__match='bar')

Possibility 2:

s = S().query(_all__match='bar')

The second possibility works already--we'd just have to document it. Is that too weird?


robhudson commented Apr 18, 2013

Possibility 1 is weird to me. 2 is ok. Adding a query_all seems overkill.


willkg commented Apr 18, 2013

Possibility 2 works already, so we'd just need to document it. Adding a query_all breaks out of the API, so I'm kind of loathe to do that without serious thought/compelling reasons at the moment.

Anyhow, that's two votes for possibility 2 so far. I'll let this stew a bit for other votes and syntax options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment