NullPointerException with prefix query

I accidentally use boost syntax in a field of prefix query and got a
NullPointerException.

When doing the same with match query i simply got an empty answer so i
suppose the behavior is not normal.

Query and stack trace are in the following gist ...

Should i open an issue ?

Regards.

Benoît

--

I think we could probably do some better validation here and provide a
better error message. I do think you should open an issue.

On Tuesday, November 13, 2012 3:32:06 AM UTC+13, Benoît wrote:

I accidentally use boost syntax in a field of prefix query and got a
NullPointerException.

When doing the same with match query i simply got an empty answer so i
suppose the behavior is not normal.

Query and stack trace are in the following gist ...
https://gist.github.com/4059732

Should i open an issue ?

Regards.

Benoît

--

On Monday, November 12, 2012 11:32:36 PM UTC+1, Chris Male wrote:

I think we could probably do some better validation here and provide a
better error message. I do think you should open an issue.

Done.

--

By the way, '^' doesn't have the same effect in prefix queries as it does
in the query_string and multi_match queries. The query in your example
simply tries to search the field with a strange name "field^2". If you want
to boost this query, use "boost":2.0 parameter instead.

On Wednesday, November 14, 2012 4:31:59 AM UTC-5, Benoît wrote:

On Monday, November 12, 2012 11:32:36 PM UTC+1, Chris Male wrote:

I think we could probably do some better validation here and provide a
better error message. I do think you should open an issue.

Done.

https://github.com/elasticsearch/elasticsearch/issues/2408

--

Hi,

On Wednesday, November 14, 2012 4:24:24 PM UTC+1, Igor Motov wrote:

By the way, '^' doesn't have the same effect in prefix queries as it does
in the query_string and multi_match queries. The query in your example
simply tries to search the field with a strange name "field^2". If you want
to boost this query, use "boost":2.0 parameter instead.

Of course i noticed this.

I generate qdsl query from another syntax and got this error during
development and so report it.

Thank you for your answers.

Benoît

--