On 8/10/06, Doron Cohen <[EMAIL PROTECTED]> 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
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