You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by flaiz <zo...@gmail.com> on 2010/05/28 15:31:19 UTC

Surround QueryParser and PhraseQuery

Hello

I'm having problem with searching phrase and using Surround Query Parser, so
let look at input surround queries (test examples)
   1. "yellow orange"
   2. lemon 2n ("yellow orange") 4n banana
where 2n, 4n are within connectors.

You see I surrounded yellow orange into quotes to let the parser know this
is PhraseQuery, but unfortunately the parser does not support PhraseQuery at
all. Could you please advice some workaround for such situation? How I
should handle such queries to get results from an index? I believe this is
common problem and there already is some solution.....

I'm using Lucene version 2.9.1.

Thanks,
Flaiz 
-- 
View this message in context: http://lucene.472066.n3.nabble.com/Surround-QueryParser-and-PhraseQuery-tp851722p851722.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Surround QueryParser and PhraseQuery

Posted by Ahmet Arslan <io...@yahoo.com>.
> I'm having problem with searching phrase and using Surround
> Query Parser, so
> let look at input surround queries (test examples)
>    1. "yellow orange"
>    2. lemon 2n ("yellow orange") 4n banana
> where 2n, 4n are within connectors.

You don't need phrasequery when you already have spannearquery.

surround equivalent of "yellow orange" is yellow w orange

lemon 2n ("yellow orange") 4n banana => lemon 2n (yellow w orange) 4n banana


      

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org