lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: PrefixFilter Memory Consumption
Date Tue, 17 Oct 2006 21:10:09 GMT
On 10/17/06, vasu shah <> wrote:
>   Can anyone please tell as to what is the difference between PrefixFilter and WildcardQuery
as far as memory is concerned?
>   I saw the code of PrefixFilter and it gets TermEnum for all the terms in the index.
Won't this consume memory??

It takes time, not memory.  TermEnum is like an iterator - it doesn't
keep everything it iterates over in memory.  The memory for filters
will be for the bitset (1 bit for every document in the index, so a 1M
doc index will take 125KB of mem per filter).

Both PrefixQuery and PrefixFilter need to use a TermEnum, the
difference is what they do with the resulting terms.

-Yonik Solr, the open-source Lucene search server

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

View raw message