lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Query Filters on term A in query "A AND (B OR C OR D)"
Date Fri, 14 Nov 2003 13:19:21 GMT
On Thursday, November 13, 2003, at 04:32  PM, Jie Yang wrote:
> Well, not quite, User normally enters a search string
> A that normally returns 1000 out of 2 millions docs. I
> then append A with 500 OR conditions... A AND (B or C
> or ... or x500). I am trying to optimse the 500 OR
> terms so that it does not do a full 2 millions docs
> search but on the 1000 returned. Would this help?

Give it a try and you tell me if it helps :)

> How long will the filtered doc id be retained in the
> memory? can I manually manpulate this filtered doc
> ids, say pre-populate a sets of filtered data in
> memory and play with memory sizes.

I believe Doug gave the detailed scoop on this.  QueryFilter uses a 
cached BitSet with each bit corresponding to a document.  So the space 
is very minimal, but the benefits could be enormous.  As Doug said, if 
the additional terms you are adding are static a QueryFilter will work 
wonders.  If the terms you add vary for every query then it won't.

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message