lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doron Cohen" <cdor...@gmail.com>
Subject Re: Query to ignore certain phrases
Date Tue, 12 Aug 2008 11:47:37 GMT
>
> I think it should look something like this
>
> "white house" NOT "russian white house"~1


"a b c"~1 just matches more 'easily' than "a b c".
It will match for instance "a b d c". The NOT however
excludes all documents which match this, unlike requested logic.

In fact,
   Q1:      "a b" NOT "a b c"~1
is worse than
   Q2:      "a b" NOT "a b c"
in that a document containing
   "a b x c"
should have been matched, and will be matched by Q2 but not with Q1.
Both Q1 and Q2 will not match this:
   "a b x y z a b c"
which should be matched...

>    "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?
>

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