lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Aristov" <alexander.aris...@gmail.com>
Subject Re: Query to ignore certain phrases
Date Tue, 12 Aug 2008 08:56:55 GMT
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 <jeff@mdbconsulting.com> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Best Regards
Alexander Aristov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message