lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <>
Subject Re: Poor performance "race condition" in FieldSortedHitQueue
Date Thu, 10 Aug 2006 14:52:45 GMT
On 8/10/06, Doron Cohen <> wrote:
> I have one more comment on the cache implementation. It feels to me
> somewhat not right that a static system wide object (FieldCache.DEFAULT) is
> managing the field caching for all the indexReaders in the JVM (possibly of
> different indexes), when in fact there is no
> dependency/relation/cooperation between the different indexReaders, cache
> wise. It seems cleaner and simpler to have FieldCacheImpl take care of a
> single IndexReader, and so have that cache "belong" to the indexReader.
> This would make the cache implementation simpler. Synchronization would
> only need to be on field values. This way we also get rid of the
> WeakHashMap (which, btw, I never got to fully trust).

Sorting was introduced to Lucene before my time, so I don't know the
reasons behind it.  Maybe it was seen as non-optimial or non-core and
so was kept out of the IndexReader.

I admit, it does feel like the level of abstraction that FieldCache is
at is higher than that of the IndexReader (the lowest level).

-Yonik Solr, the open-source Lucene search server

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

View raw message