Right, make sense. On Tue, May 18, 2010 at 4:23 AM, Yonik Seeley <yo...@lucidimagination.com>wrote:
> On Mon, May 17, 2010 at 9:14 PM, Shay Banon <kim...@gmail.com> wrote: > > Oh, and one more thing. Deleted docs is a sub case, with NRT, most people > > will almost always add docs as well... . So it is still not really usable > > for field cache, right? > > FieldCache should be fine for the general cases - the same entry will > be used if the segment hasn't changed at all, or if the segment has > only changed which documents are deleted. Adding new documents adds > new segments and does affect (until merge) existing segments, so the > entries will be reused. > > -Yonik > http://www.lucidimagination.com > > > > On Tue, May 18, 2010 at 4:12 AM, 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. > >> > >> 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... > >> > >> -shay.banon > >> > >> > >> On Tue, May 18, 2010 at 4:04 AM, Yonik Seeley < > yo...@lucidimagination.com>wrote: > >> > >>> On Mon, May 17, 2010 at 9:00 PM, Shay Banon <kim...@gmail.com> wrote: > >>> > Great, so I am not imagining things this late into the night ... ;), > not > >>> so > >>> > great, since using NRT with field cache (like sorting) or caching > >>> filters, > >>> > or anything that caches based on IndexReader not really an option. > This > >>> > makes NRT very problematic to use in a real application. > >>> > >>> NRT is still pretty new :-) And I do believe this is a bug, so we'll > >>> get it fixed. > >>> It's not actually a problem for FieldCache though - it no longer keys > >>> on the reader directly (if deleted docs are the only things that have > >>> changed, the FieldCache entry can still be shared). > >>> > >>> -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 > >>> > >>> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >