The "Sorted" in "SortedNumericDocValuesField" is about the fact that
per-document values are returned in numeric order. For instance if you
index two values for a document, the insertion order will be ignored and
when you will pull sorted numeric doc values on a LeafReader, values for
that document will be returned in ascending order.

If you have a single-valued field, then NumericDocValuesField is the way to
go. Actually SortedNumericDocValuesField falls back to encoding information
on disk the same way as NumericDocValuesField when it notices that a field
is effectively single-valued.

Le ven. 24 mars 2017 à 10:19, aravinth thangasami <
aravinththangas...@gmail.com> a écrit :

> Hi all,
>
> I'm analysing sorting using doc values.
>
> Please correct me if I am wrong
>
>
> 1.In SortedNumericDocvalueField, the sorting apply across field, not across
> segment
>
> 2.While Sorting the SortedNumericSelector forms a NumericDocvalue from
> SortedSetDocvaluesField
> So, I thought for a SinglevalueField I decided to use NumericDocvalue,
>
> Does SortedNumericDocvalueField has any advantage for single valued field
> while sorting
>
>  Am I missing anything in it?
>
>
>
> Thanks
> Aravinth
>

Reply via email to