Mailing List Archive

How to constrict search results with NOT
Hello,

I have the following problem: I get a list of documents, from another
application, which to use as the base for a new search. The problem is,
that it should be possible to constrict this list with the NOT operator,
but as I understand, it is not possible to search only with NOT.

In short words: I have a list of docs (I'm using a BitSet as
QueryFilter) and I want to allow users, to use the normal queries from
lucene, like: "NOT (Bill Clinton)". I think the problem is, that: "The
NOT operator cannot be used with just one term" (from query syntax), and
I do not have the query, which has build the "set of documents" in which
to search.

Has anyone an idea how to solve this problem?

Regards

Stefan
Re: How to constrict search results with NOT [ In reply to ]
Hi Stefan,

Try this:
http://wiki.apache.org/jakarta-lucene/LuceneFAQ#head-0cda565d913389773ca9c3246bde894c3e99084e

Otis

--- "Schuh, Stefan" <Stefan.Schuh@coi.de> wrote:
> Hello,
>
> I have the following problem: I get a list of documents, from another
> application, which to use as the base for a new search. The problem
> is,
> that it should be possible to constrict this list with the NOT
> operator,
> but as I understand, it is not possible to search only with NOT.
>
> In short words: I have a list of docs (I'm using a BitSet as
> QueryFilter) and I want to allow users, to use the normal queries
> from
> lucene, like: "NOT (Bill Clinton)". I think the problem is, that:
> "The
> NOT operator cannot be used with just one term" (from query syntax),
> and
> I do not have the query, which has build the "set of documents" in
> which
> to search.
>
> Has anyone an idea how to solve this problem?
>
> Regards
>
> Stefan
>