Query_string supported features


(bcoder) #1

Does query_string (http://www.elasticsearch.org/guide/reference/query-
dsl/query-string-query.html) support all lucene features (http://
lucene.apache.org/core/old_versioned_docs/versions/3_0_0/
queryparsersyntax.html), like: proximity searching, boosting a term,
boolean operators, grouping, field searching, etc ? Is there a way to
disable/enable some of these (I see for wildcard there is, but do not
see for any other feature)

Thanks!


(Shay Banon) #2

Yes, it uses the same parser, with some extensions (like automatically
using the relevant analyzer for a specific field, supporting multiple
fields).

On Thu, Jun 14, 2012 at 11:26 PM, bcoder blitzkriegcoder@gmail.com wrote:

Does query_string (http://www.elasticsearch.org/guide/reference/query-
dsl/query-string-query.html) support all lucene features (http://
lucene.apache.org/core/old_versioned_docs/versions/3_0_0/
queryparsersyntax.html), like: proximity searching, boosting a term,
boolean operators, grouping, field searching, etc ? Is there a way to
disable/enable some of these (I see for wildcard there is, but do not
see for any other feature)

Thanks!


(bcoder) #3

Thanks! I have 2 related follow-up questions:

  1. I am unable to search for query string's with two question mark
    ( ? ) wildcard character together. For ex: "h?l?o" works fine, but
    "he??o" fails to work (ES returns HTTP 500).

  2. Is there some place where I can find exact format for valid query
    string's so that I can parse it on front-end, and user cannot enter
    invalid strings, like for example these query_string's fail (ES
    returns HTTP 500): "hello AND", "hello +", "hello OR", "hello~~",
    "hello~1.0", "hel??o", "hello:", etc ... Failure of most of these make
    sense, but is there a proper query string language defined, so that I
    can verify user input with confidence ?

Thanks!

On Jun 14, 2:28 pm, Shay Banon kim...@gmail.com wrote:

Yes, it uses the same parser, with some extensions (like automatically
using the relevant analyzer for a specific field, supporting multiple
fields).

On Thu, Jun 14, 2012 at 11:26 PM, bcoder blitzkriegco...@gmail.com wrote:

Does query_string (http://www.elasticsearch.org/guide/reference/query-
dsl/query-string-query.html) support all lucene features (http://
lucene.apache.org/core/old_versioned_docs/versions/3_0_0/
queryparsersyntax.html), like: proximity searching, boosting a term,
boolean operators, grouping, field searching, etc ? Is there a way to
disable/enable some of these (I see for wildcard there is, but do not
see for any other feature)

Thanks!


(system) #4