Query DSL: New "text" family of queries and more


Just pushed a very important feature to elasticsearch, and I think one of the big ones in terms of usability (not a big one effort wise).

The aim of text queries family is to reduce the confusion of term query and provide a family of queries that just do analysis and constructs queries out of them (with different types). In general, when in double, use text query should be the new slogan for the query dsl.

Here is the issue: https://github.com/elasticsearch/elasticsearch/issues/917. Which also explains the comparison of it to query_string / field query. Note the nice phrase_prefix text type query.

Last, though really a syntactic sugar, fuzziness is now supported for numeric and date types. Once can issue a fuzzy query on a date type with min_similarity of "1h", and it will automatically be translated to a range query (you can do that with text query as well by setting its fuzziness). Here is the issue: https://github.com/elasticsearch/elasticsearch/issues/907.