Using Lucy::Search::PhraseQuery as default query

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using Lucy::Search::PhraseQuery as default query

Nick D.
Is there any downside to using Phrase Query for 1 word queries? The results seem to be the same in my test cases. Not sure if there are some caveats that I haven't ran into yet.
Reply | Threaded
Open this post in threaded view
|

Re: [lucy-user] Using Lucy::Search::PhraseQuery as default query

Marvin Humphrey
On Wed, Dec 11, 2013 at 9:58 AM, Nick D. <[hidden email]> wrote:
> Is there any downside to using Phrase Query for 1 word queries? The results
> seem to be the same in my test cases. Not sure if there are some caveats
> that I haven't ran into yet.

There is no downside.  Lucy's query optimization logic shunts 1-term
PhraseQueries and TermQueries down the same code path.  Results and
scores should both be the same.

Cheers,

Marvin Humphrey