lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: What is the difference between these searches?
Date Tue, 09 Nov 2004 22:47:13 GMT
On Tuesday 09 November 2004 23:14, Luke Francl wrote:
> On Tue, 2004-11-09 at 16:00, Paul Elschot wrote:
> > Lucene has no provision for matching by being prohibited only. This can
> > be achieved by indexing something for each document that can be
> > used in queries to match always, combined with something prohibited
> > in a query.
> > But doing this is bad for performance for querying larger nrs of docs.
> I'm familiar with Lucene's restrictions on prohibited queries, and I
> have a required clause for a field that will always be part of the query
> (it's not a nonsense value, it's the item type of the object in a CMS). 

That might also be mapped  to a filter.
> My problem is that I have been considering the whole query object that
> I've generated. Every BooleanQuery that's a part of my finished query
> must also have a required clause if it has a prohibited clause.
> I'm thinking of refactoring my code so that instead of joining together
> Query objects into a large BooleanQuery, it passes around BooleanClauses
> and assembles them into a single BooleanQuery.

It may not be possible to flatten a boolean query to a single level, eg:
(+aa +bb) (+cc +dd)
+(a1 a2) +(b1 b2)

These will generate nested BooleanQuery's iirc.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message