You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Mark Miller <ma...@gmail.com> on 2006/07/16 16:35:07 UTC
Hits syncronization
Does the Hits class need to use a Vector for it's cache? Is the cache
somehow shared among threads or should this be an ArrayList to avoid
synchronization costs? Also, I do not see any backing array size
initialization. Is this because the default of 10 is optimal? Am I wrong
all over the place?
- mark
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Hits syncronization
Posted by karl wettin <ka...@gmail.com>.
On 7/16/06, Mark Miller <ma...@gmail.com> wrote:
> Does the Hits class need to use a Vector for it's cache? Is the cache
> somehow shared among threads or should this be an ArrayList to avoid
> synchronization costs? Also, I do not see any backing array size
> initialization. Is this because the default of 10 is optimal? Am I wrong
> all over the place?
The Vector in Hits (Document, RAMDirectory and many more places) are
artifacts from the early days of Lucene (and Java). There has been
some discussion on if they should be replaced or not, but never got
anywhere.
You can safely change it to a JCF-list of your preference.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org