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

"in" is used for queries and filters in EU, but it's not in the ES docs #243

Closed willkg closed 10 years ago

willkg commented 10 years ago

ElasticUtils has an "in" action for both filters and queries which isn't in the Elasticsearch docs for 0.90 or 1.0+. There are tests for the filter and query, so it works with 0.90 and 1.0. This suggests it was added a long time ago:

https://github.com/mozilla/elasticutils/blob/master/CHANGELOG#L590

The goal of this bug is to figure out what's going on.

  1. Was "in" deprecated at some point and we should start using something else? If so, what?
  2. Why do our docs say "in" does a "terms" query? Did it at some point, but does something different now? Why?
eire1130 commented 10 years ago

I believe "in" is an allias for terms in elasticsearch query dsl.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-terms-query.html

For 1.) There is no deprecation notice, at least in the documentation, so I think this is safe to leave as is.

for 2.) I think we should just support both verbatim.

willkg commented 10 years ago

Awesome--good to know. I'll keep this open as a reminder to update the docs. I'll do that in July unless someone beats me to it.