mozilla / elasticutils

[deprecated] A friendly chainable ElasticSearch interface for python
http://elasticutils.rtfd.org
BSD 3-Clause "New" or "Revised" License
243 stars 76 forks source link

Query with AND operator #291

Closed un1t closed 8 years ago

un1t commented 8 years ago

This example uses default OR operator.

q = S().query(title__match='taco trucks')

It is possible to use here AND operator?

sabine commented 8 years ago

@un1t Are you deeply invested in using ElasticUtils? If the answer is no, use https://github.com/elasticsearch/elasticsearch-dsl-py instead (as suggested in README). There, you can easily use all the features of Elasticsearch in a straight-forward way.

Just saying, because this is no longer maintained and my experience has been that transitioning the queries to elasticsearch-dsl-py was not hard. The mapping classes and indexing tasks for django are convenient, though - I still use these.

un1t commented 8 years ago

I did not know that project is not maintaned anymore. So, OK, I'll switch to elasticsearch-dsl-py.

willkg commented 8 years ago

I wrote up a blog post about some things we did when converting:

http://bluesock.org/~willkg/blog/mozilla/ditching_elasticutils.html

un1t commented 8 years ago

Thank you!