: The main problem being knowing if a doc had a value, right? : The FieldCache doesn't always store that info (only for string-based types).
yeah ... i remember giving this some thought before ... ideally the FieldCache methods (getInts, etc...) would have a way for you to specify what value you wanted given to docs without values ... if the parsers (IntParser, FloatParser, etc...) were abstract classes instead of interfaces it could be added there. but that ship has sailed. : Or I guess perhaps not even using the FieldCache at all... but the : memory duplication would be undesirable if a FieldCacheSource or : FieldCache for the same field was used elsewhere. or go all out: get LUCENE-831 all polished up, and change the FieldValueSource (or it's CustomScoreQuery equivilent) to use it directly with a new option that knows when a doc doesn't have a value :) -Hoss