lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: Queries not derived from the text index
Date Thu, 09 Feb 2006 00:42:06 GMT
Erik Hatcher wrote:
> Actually I'm pretty certain that it'll work with just getFieldQuery 
> overriding.  You can AND or OR a FilteredQuery with any other Query 
> inside a BooleanQuery.  I'd be surprised if it didn't work.  Scoring is 
> the one tricky caveat to this sort of thing, and perhaps the new 
> "function" capability would be the ticket to adjusting scores for your 
> non-Lucene "search".

Scoring is mostly irrelevant in our system, luckily.  We only care that 
all the results are returned, not so much that they're in the right order.

I think that overriding getFieldQuery would work, yeah... you're right. 
   It's just a matter of comparing efficienty of this:

     BooleanQuery of (TermQuery, FilteredQuery of (AllDocsQuery, Filter))

to the efficiency of this:

     FilteredQuery of (TermQuery, Filter)

But perhaps removing the redundant boolean queries is something I could 
do in a final pass of the Query object that gets spat out of the parser.

> I'm pulling of the same sort of stunts with the faceted search system 
> I've developed.  The data has not currently reached the "huge" level 
> yet, but it is growing and memory will become more of a concern.  There 
> is a memory saving alternative BitSet-like implementation available in 
> JIRA somewhere (sorry, no reference handy, but it's there and probably 
> finable by a "BitSet" search).  Perhaps that is worth consideration in 
> your case.  There is also discussion about changing how Filters work to 
> not use a BitSet directly but rather an enumeration-like interface such 
> at TermEnum, etc.

That would be interesting, I might go looking for that.  Memory usage is 
really our only concern with using filters for all of this, but if 
filters were reworked to use the same kind of mechanism as queries use 
internally, then there is certainly no point in me going and trying to 
make custom Query subclasses.


Daniel Noll

Nuix Australia Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia
Phone: (02) 9280 0699
Fax:   (02) 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

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

View raw message