Re: question about QueryParser's method setAutoGeneratePhraseQueries()

2016-12-07 Thread Gang Li
Hi Steve, Thanks for the clarification! Now I understand what this function is for. (I tried "term1-term2" and indeed it's parsed into a phrase query) I was trying to save typing the quotation marks as most of my use cases are phrase search. Seems this can't be done for now :) Best, Gang On

Re: question about QueryParser's method setAutoGeneratePhraseQueries()

2016-12-05 Thread Steve Rowe
Hi Gang, The javadoc explanation isn’t very clear, but the process is: 1. Split query on whitespace (‘term1 term2’ is split into ‘term1’ and ‘term2’) 2. For each split term: if autoGeneratePhraseQueries=true, and analysis produces more than one term, for example a synonym ’term1’->’multiple

question about QueryParser's method setAutoGeneratePhraseQueries()

2016-12-04 Thread Gang Li
Hi everyone, I'm trying to make the QueryParser parse a raw query without quotes into a phrase query by default, and according to Lucene doc it seems I can use the method setAutoGeneratePhraseQueries(). (