lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: FieldCacheImpl concurrency
Date Thu, 11 Feb 2010 15:41:18 GMT
On Thu, Feb 11, 2010 at 9:54 AM, Shay Banon <> wrote:
>    I would like to try and improve concurrency in Lucene in several places,
> and thought I would start with FieldCacheImpl. The implementation is heavily
> synchronized on both a global map and on creation values for a pretty
> heavily used path (get).

It really shouldn't be heavily used.
For a sorted search, get() is called once per segment in the index.
There is no synchronization to retrieve per-document values.

We have just barely moved to Java5 though, and so it would probably be
pretty easy to improve the concurrency of the read path if it did
become problematic.

> I think the weak hash map is a good solution (but
> also think that the ability to choose to use soft hash map would add even
> greater flexibility), the problem is that there is no built in concurrent
> weak/soft hash map.

It might be a better idea to have interfaces that allow one to
implement their own policies rather than to try and push all the
different options into Lucene:


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

View raw message