lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Ganyo <scott.ga...@eTapestry.com>
Subject RE: cvs commit: jakarta-lucene/src/java/org/apache/lucene/search QueryFilter.java
Date Mon, 05 Aug 2002 18:51:23 GMT
> This filter keeps a BitSet of all the matching documents.  
> Hits does not 
> do this, and it would cause it to use a lot more memory to make it do 
> so.  All of the queries which would never be used as a filter 
> would thus pay this penalty.

My thought was that the Filter.bits() method on Hits would only resolve the
BitSet if it was asked for (and probably wouldn't even cache it), so in the
common case Hits wouldn't suffer any ill effect.  Would that work?  (I feel
like I'm missing something obvious...)

Thanks,
Scott

> -----Original Message-----
> From: Doug Cutting [mailto:cutting@lucene.com]
> Sent: Monday, August 05, 2002 1:23 PM
> To: Lucene Developers List
> Subject: Re: cvs commit:
> jakarta-lucene/src/java/org/apache/lucene/search QueryFilter.java
> 
> 
> Scott Ganyo wrote:
> > I assume that this means that my suggestion (for making 
> Hits work as a
> > Filter) was discarded.  Was there any particular reason why?  Just
> > curious...
> 
> Sorry I never got back to you.
> 
> This filter keeps a BitSet of all the matching documents.  
> Hits does not 
> do this, and it would cause it to use a lot more memory to make it do 
> so.  All of the queries which would never be used as a filter 
> would thus 
> pay this penalty.
> 
> Perhaps we should add a getQuery() method to Hits so that folks can 
> extract the query and use it to construct a filter or another query. 
> Would that meet your needs?
> 
> Note however that filters do not affect scoring.  Using a 
> QueryFilter is 
> not the same as requiring that same query in a BooleanQuery: 
> the ranking 
> may be different.
> 
> Doug
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:lucene-dev-help@jakarta.apache.org>
> 

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