lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Extending Sort/FieldCache
Date Tue, 25 Aug 2009 17:36:35 GMT

: 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.


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

View raw message