Docvalue - Sorting on Numeric Docvalue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Docvalue - Sorting on Numeric Docvalue

aravinth thangasami
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Docvalue - Sorting on Numeric Docvalue

Adrien Grand
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 <
[hidden email]> 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
>
Loading...