On 10/17/06, vasu shah <[EMAIL PROTECTED]> 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
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to