lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: lucene search options
Date Mon, 08 Dec 2008 15:54:15 GMT
Have you enabled leading wildcards? They are not (or at least weren't
last I knew) enabled by default....

<<<QueryParser.setAllowLeadingWildcard( true )>>>

from


http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-4d62118417eaef0dcb87f4370583f809848ea695

Best
Erick

On Mon, Dec 8, 2008 at 10:24 AM, no spam <mrs.nospam@gmail.com> wrote:

> The reason our users want to do this is because they want to search for
> instances where certain negative conditions are true.  My client is the
> news
> industry and this is metadata for things like reporter, type, etc.
>  Sometimes you want -reporter:mark for example and this is the only
> criteria
> to search against the index.
>
> Am I thinking about this wrong?
>
> I did try using the MatchAllDocsQuery class and it expands to something
> like
> this:
>
> summary:matchalldocsquery -reporter:*mark*
>
> but I don't get any results which is not what I expect for my does not
> contain query above.
>
> On Sat, Dec 6, 2008 at 11:06 PM, Anshum <anshumg@gmail.com> wrote:
>
> > Hi,
> >
> > An easy way to do that would be to index a particular term with all docs
> > e.g. "dummyword" could be indexed for all documents as a value for a
> > dummyfield or an existing field.
> > This way lets assume you want to fetch results for -filed1:jakarta
> > You could search for dummyfield:"dummyword" AND NOT filed1:jakarta
> >
> > This is just one of the solution, though I still would not understand if
> > there's a logical reason for fetching such results.:)
> >
> > --
>

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