On Mon, May 17, 2010 at 9:12 PM, Shay Banon <kim...@gmail.com> wrote: > Just saw that you opened a case for that. I think that its important in your > test case to also test for object identity, not just equals. This is because > the IndexReader (or the FieldCacheKey) are used as keys in weak hash maps, > which uses identity (==) equality for keys.
Yeah, just me being lazy... I just knew that those objects don't implement equals and hence it ends up the same as ==. But I agree an explicit == would be better. > If FieldCacheKey is supposed to represent the key by which index readers > should be tested for "equality" (for example, it will be used in the > CachingWrapperFilter), and not the index reader itself, then I think it > should be renamed. What do you think? I am just looking now at what it does, > its new... I don't think it's general purpose, since it ignores things like a change in deleted documents. I think we should use the same reader when the segment has not been changed. -Yonik http://www.lucidimagination.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org