QueryParser.setAutoGeneratePhraseQueries()


(Iori) #1

Hi,

I wonder if QueryParser.setAutoGeneratePhraseQueries() is exposed through
API.
From Lucene 3.1, the default value of AutoGeneratePhraseQueries becomes
"false" for some reason. It breaks CJK queries. To make CJK queries to work,
we need to call QueryParser.setAutoGeneratePhraseQueries(true).

If it's not possible, can I open a ticket for it?

Thanks,
Iori


(Michael McCandless) #2

I think setting this to "true" breaks CJK queries... eg see
http://markmail.org/thread/ww6mhfi3rfpngmc5

It was changed to "false" by default in Lucene (see
https://issues.apache.org/jira/browse/LUCENE-2458 ) to not break CJK
queries.

But I agree this setting should be controllable via ES.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 12:40 AM, Iori haseori@gmail.com wrote:

Hi,
I wonder if QueryParser.setAutoGeneratePhraseQueries() is exposed through
API.
From Lucene 3.1, the default value of AutoGeneratePhraseQueries becomes
"false" for some reason. It breaks CJK queries. To make CJK queries to work,
we need to call QueryParser.setAutoGeneratePhraseQueries(true).
If it's not possible, can I open a ticket for it?

Thanks,
Iori


(Iori) #3

Hi,

"break" might not be right word. It is "break" for us, though.
It doesn't return the same result as previous version and we need
QueryParser to behave the same as 3.0.

Anyway, I will create a ticket.

Iori

2011/5/24 Michael McCandless mail@mikemccandless.com

I think setting this to "true" breaks CJK queries... eg see
http://markmail.org/thread/ww6mhfi3rfpngmc5

It was changed to "false" by default in Lucene (see
https://issues.apache.org/jira/browse/LUCENE-2458 ) to not break CJK
queries.

But I agree this setting should be controllable via ES.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 12:40 AM, Iori haseori@gmail.com wrote:

Hi,
I wonder if QueryParser.setAutoGeneratePhraseQueries() is exposed through
API.
From Lucene 3.1, the default value of AutoGeneratePhraseQueries becomes
"false" for some reason. It breaks CJK queries. To make CJK queries to
work,
we need to call QueryParser.setAutoGeneratePhraseQueries(true).
If it's not possible, can I open a ticket for it?

Thanks,
Iori


(Shay Banon) #4

Yea, this field is not exposed in ES, open an issue, easy to expose.
On Tuesday, May 24, 2011 at 2:36 PM, Iori wrote:

Hi,

"break" might not be right word. It is "break" for us, though.
It doesn't return the same result as previous version and we need QueryParser to behave the same as 3.0.

Anyway, I will create a ticket.

Iori

2011/5/24 Michael McCandless mail@mikemccandless.com

I think setting this to "true" breaks CJK queries... eg see
http://markmail.org/thread/ww6mhfi3rfpngmc5

It was changed to "false" by default in Lucene (see
https://issues.apache.org/jira/browse/LUCENE-2458 ) to not break CJK
queries.

But I agree this setting should be controllable via ES.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 12:40 AM, Iori haseori@gmail.com wrote:

Hi,
I wonder if QueryParser.setAutoGeneratePhraseQueries() is exposed through
API.
From Lucene 3.1, the default value of AutoGeneratePhraseQueries becomes
"false" for some reason. It breaks CJK queries. To make CJK queries to work,
we need to call QueryParser.setAutoGeneratePhraseQueries(true).
If it's not possible, can I open a ticket for it?

Thanks,
Iori


(Michael McCandless) #5

Ahh, OK, makes sense.

You (or ES) could also pass Version.LUCENE_30 as the "matchVersion"
param to QueryParser.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 7:36 AM, Iori haseori@gmail.com wrote:

Hi,
"break" might not be right word. It is "break" for us, though.
It doesn't return the same result as previous version and we need
QueryParser to behave the same as 3.0.
Anyway, I will create a ticket.

Iori
2011/5/24 Michael McCandless mail@mikemccandless.com

I think setting this to "true" breaks CJK queries... eg see
http://markmail.org/thread/ww6mhfi3rfpngmc5

It was changed to "false" by default in Lucene (see
https://issues.apache.org/jira/browse/LUCENE-2458 ) to not break CJK
queries.

But I agree this setting should be controllable via ES.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 12:40 AM, Iori haseori@gmail.com wrote:

Hi,
I wonder if QueryParser.setAutoGeneratePhraseQueries() is exposed
through
API.
From Lucene 3.1, the default value of AutoGeneratePhraseQueries becomes
"false" for some reason. It breaks CJK queries. To make CJK queries to
work,
we need to call QueryParser.setAutoGeneratePhraseQueries(true).
If it's not possible, can I open a ticket for it?

Thanks,
Iori


(Masaru Hasegawa) #6

Hi,

Yes, actually I ended up re-setting org.elasticsearch.common.lucene.Lucene.QUERYPARSER_VERSION using reflection.
But it looks I don't need it any more since this is already implemented :slight_smile:

Iori
On Tuesday, May 24, 2011 at 14:33 , Michael McCandless wrote:
Ahh, OK, makes sense.

You (or ES) could also pass Version.LUCENE_30 as the "matchVersion"
param to QueryParser.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 7:36 AM, Iori haseori@gmail.com wrote:

Hi,
"break" might not be right word. It is "break" for us, though.
It doesn't return the same result as previous version and we need
QueryParser to behave the same as 3.0.
Anyway, I will create a ticket.

Iori
2011/5/24 Michael McCandless mail@mikemccandless.com

I think setting this to "true" breaks CJK queries... eg see
http://markmail.org/thread/ww6mhfi3rfpngmc5

It was changed to "false" by default in Lucene (see
https://issues.apache.org/jira/browse/LUCENE-2458 ) to not break CJK
queries.

But I agree this setting should be controllable via ES.

Mike

http://blog.mikemccandless.com

On Tue, May 24, 2011 at 12:40 AM, Iori haseori@gmail.com wrote:

Hi,
I wonder if QueryParser.setAutoGeneratePhraseQueries() is exposed
through
API.
From Lucene 3.1, the default value of AutoGeneratePhraseQueries becomes
"false" for some reason. It breaks CJK queries. To make CJK queries to
work,
we need to call QueryParser.setAutoGeneratePhraseQueries(true).
If it's not possible, can I open a ticket for it?

Thanks,
Iori


(system) #7