lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markharw00d <markharw...@yahoo.co.uk>
Subject Re: Lucene Queries Over User-Editable Dynamic Categories of Documents
Date Wed, 24 Oct 2007 21:59:28 GMT
lucene user wrote:
> Thanks for all your help!
>
> We are using Lucene 2.1.0 and TermsFilter seems to be new in Lucene 2.2.0.
> I have not been able to find SortedVIntList in the javadocs at all.
>   

No, SortedVIntList is in the patch I provided a link to earlier.


> Because both SortedVIntList and a regular BitSet are based on Lucene
> Document Numbers, which are not permanent, It seems we will need to
> generate these objects fresh at least once per session. Any comments,
> about that? Do I have that correct?
>   
Yes. Most caches tend to be held in WeakHashMap keyed on IndexReader so 
that when a new reader takes over old caches are automatically garbage 
collected.


> Our application includes the following filter implementation that we use for
> a
> slightly different end user category problem. We could easily use it for our
> current problem as well.
>
> Is TermsFilter sufficiently better (faster, more compact, more correct,
> etc.) to make upgrading
> very important?
>   
TermsFilter is in "contrib" and is stand-alone so should work with most 
Lucene versions.
Your implementation looks to scan the whole termEnum whereas TermsFilter 
looks up only the selected terms using reader.termDocs(term). 
Benchmarking will tell you which is faster. I'd be interested to know 
the results.

Cheers
Mark


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


Mime
View raw message