Thanks a lot for the response ! I wanted to avoid two things: * Writing the logic that invokes cache-refresh upon IndexReader reload. * Write my own TopFieldCollector which uses this cache.
I guess I don't have any other choice by to write both of them, or try to make TFC more "customizable" such that someone can pass in his own FieldCachePQ. I'll start w/ my own version and if possible suggest an extension to TFC. Thanks again, Shai On Tue, Aug 25, 2009 at 8:36 PM, Chris Hostetter <hossman_luc...@fucit.org>wrote: > > : I'd like to extend Lucene's FieldCache such that it will read native > values > ... > : payload value to long, and store it in the cache. The reason I want to > : extend Lucene's FieldCache is because I'd like Lucene to take care of > : updating this cache when necessary (such as after reopen for example). > This > : will allow me to use Lucene's Sort option more easily. > > this was my motivation when i opened LUCENE-831, but i promptly got bogged > down with other shit and had to abandon that issue ... > Miller/Uwe/McCandles seemed like they were making really cool progress > with it, but (if i remember correctly) it seems to have gotten into some > sort of quagmire related to reopen and segment merging -- which led to a > lot of the current segment based sortinging we have now, which makes most > of that issue obsolete. > > but we still have hte issue of wanting to provide your own caching > mechanism -- which at the moment has no solution that i know of. > > : I noticed Sort can be extended by providing a CUSTOM SortField, but that > > i think you're only option is to use a custom Sort which uses your own > private cache of some kind. > > : I didn't find a way though to extend FieldCache, or ExtendedFieldCache > --> > : even though both are extendable, I don't find the place where they're > given > : as input to TopFieldDocCollector, FieldSortedHitQueue etc. Perhaps I'm > : missing it? > > you're not missing anything ... a singleton is used, and you can't replace > the singlton because its' a static on the Interface. > > : BTW, if it interests anyone, perhaps augmenting Lucene's sort w/ reading > : values from a Payload, or doing a complete payload-based-sort, I can work > up > : a patch ... > > I believe that was always one of Busch's goals with the payload stuff, but > last time i remember hearing about it he was thinking that rather then > doing it directly with payloads he wants to skip ahead to use column-stride > fields ... not sure if he had an implementation in mind yet though. > > > > -Hoss > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >