Count and Search API status codes are inconsistent

I'm not sure if this query is valid or not, but regardless, I'm getting a
400 from the search api and a 200 from the count API. It seems like they
should be consistent.

The output from this gist is:

{"ok":true,"_index":"myindex","_type":"mydoc","_id":"5kngTmpeR5GtJg6Vu46tUw","_version":1}\n
Count using a good query
200
Search using a good query
200
Count using a bad query
200
Search using a bad query
400

If you take out the "-o /dev/null", you can see that both the search and
count produce errors in the "bad query" case, but the count API still
returns a 200.

On a related note, is it expected that putting "*field_name:field_value" in
a query string should produce a parse exception?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Garron,

I can confirm that this is indeed inconsistent. Can you please open an
issue on Issues · elastic/elasticsearch · GitHub ?

You can read more about the lucene query syntax
here: org.apache.lucene.queryparser.classic (Lucene 4.4.0 API)

Cheers,
Boaz

On Monday, August 26, 2013 11:36:56 PM UTC+2, Garron Moore wrote:

I'm not sure if this query is valid or not, but regardless, I'm getting a
400 from the search api and a 200 from the count API. It seems like they
should be consistent.

Count and search status codes are inconsistent · GitHub

The output from this gist is:

{"ok":true,"_index":"myindex","_type":"mydoc","_id":"5kngTmpeR5GtJg6Vu46tUw","_version":1}\n
Count using a good query
200
Search using a good query
200
Count using a bad query
200
Search using a bad query
400

If you take out the "-o /dev/null", you can see that both the search and
count produce errors in the "bad query" case, but the count API still
returns a 200.

On a related note, is it expected that putting "*field_name:field_value"
in a query string should produce a parse exception?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks. I've written
up Count and Search API status codes are inconsistent (count does not return 400) · Issue #3585 · elastic/elasticsearch · GitHub

Garron

On Tuesday, August 27, 2013 12:34:43 AM UTC-7, Boaz Leskes wrote:

Hi Garron,

I can confirm that this is indeed inconsistent. Can you please open an
issue on Issues · elastic/elasticsearch · GitHub ?

You can read more about the lucene query syntax here:
org.apache.lucene.queryparser.classic (Lucene 4.4.0 API)

Cheers,
Boaz

On Monday, August 26, 2013 11:36:56 PM UTC+2, Garron Moore wrote:

I'm not sure if this query is valid or not, but regardless, I'm getting a
400 from the search api and a 200 from the count API. It seems like they
should be consistent.

Count and search status codes are inconsistent · GitHub

The output from this gist is:

{"ok":true,"_index":"myindex","_type":"mydoc","_id":"5kngTmpeR5GtJg6Vu46tUw","_version":1}\n
Count using a good query
200
Search using a good query
200
Count using a bad query
200
Search using a bad query
400

If you take out the "-o /dev/null", you can see that both the search and
count produce errors in the "bad query" case, but the count API still
returns a 200.

On a related note, is it expected that putting "*field_name:field_value"
in a query string should produce a parse exception?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.