I think it should look something like this

"white house" NOT "russian white house"~1

http://lucene.apache.org/java/docs/queryparsersyntax.html#Escaping%20Special%20Characters

Alex

On 12/08/2008, Jeff French <[EMAIL PROTECTED]> wrote:
>
>
> We're trying to perform a query where if our intended search term/phrase is
> part of a specific larger phrase, we want to ignore that particular match,
> but not the entire document (unless of course there are no other hits with
> our intended term/phrase). For example, a query like:
>
>    "white house" UNLESS "russian white house"
>
> should not produce a match on the phrase:
>
>    "russian white house"
>
> but should match:
>
>    "white house"
>
> Where this differs from the NOT operator is that we don't want to rule out
> a
> document just because it contains "russian white house", we just want to
> ignore the hit, so that this phrase:
>
>    "... in the russian white house as opposed to the american white house
> ..."
>
> would return the document.
>
> Can this be accomplished using Lucene or Qsol QueryParser syntax, or do we
> need to write something custom?
> --
> View this message in context:
> http://www.nabble.com/Query-to-ignore-certain-phrases-tp18935560p18935560.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Best Regards
Alexander Aristov

Reply via email to