tedsolr <tsm...@sciquest.com> wrote:
> I'm sure there is a good reason why SortedDocValues exposes
> the backing dictionary and [Sorted]NumericDocValues does not.

There is: Numerics does not have a backing dictionary. Instead of storing the 
values via the intermediate ordinals-map (aka by reference), they are stored 
directly. Overall it takes up less space and makes a lot of things easier (and 
a few things harder, as you have found out).

> How do I get to the ordinal for number and date fields?

You don't really. You will have to assign ordinals yourself by sorting all the 
existing values upon first call.

> I assume my fallback is to not index with doc values, and use an uninverting
> reader to get the field data. Is there a better approach?

You could index your integers as DocValued Strings, prefixed with zeroes to 
ensure same length and proper integer sort.

- Toke Eskildsen

Reply via email to