: I have noticed that in the class UninvertedField.java there is a synchronized : access to the FieldValueCache. : I would like to know why this access is synchronized. Could this end up in a : loss of performance when there are concurrent search requests?
This only synchronizes when a value hasn't been found in the cache and needs to be generated (ie: it prevents multiple threads from generating values to put in the cache concurrently) So concurrent requests that require the creation of UnInvertedField instances for distinct field names might be blocked when they don't need to be, but once the cache is populated "typical" searches should never see that synchronized block. (the synchronization could probably be improved however, by syncronizing on a CreationPlaceholder like FieldCache does) -Hoss