java.lang.Object
org.elasticsearch.search.sort.BucketedSort
org.elasticsearch.search.sort.BucketedSort.ForLongs
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Releasable
- Enclosing class:
- BucketedSort
Superclass for implementations of BucketedSort for 
long keys.- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.elasticsearch.search.sort.BucketedSortBucketedSort.ExtraData, BucketedSort.ForDoubles, BucketedSort.ForFloats, BucketedSort.ForLongs, BucketedSort.ResultBuilder<T>
- 
Field SummaryFields inherited from class org.elasticsearch.search.sort.BucketedSortbigArrays, extra, NOOP_EXTRA_DATA
- 
Constructor SummaryConstructorsConstructorDescriptionForLongs(BigArrays bigArrays, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected final booleanbetterThan(long lhs, long rhs) trueif the entry at indexlhsis "better" than the entry atrhs.protected final intgetNextGatherOffset(long rootIndex) Get the next index that should be "gathered" for a bucket rooted atrootIndex.protected final SortValuegetValue(long index) Get the value at an index.protected final voidgrowValues(long minSize) Grow the BigArray backing this sort to account for new buckets.final booleanDoes this sort need scores? Most don't, but sorting on_scoredoes.protected final voidsetNextGatherOffset(long rootIndex, int offset) Set the next index that should be "gathered" for a bucket rooted atrootIndex.protected final voidswap(long lhs, long rhs) Swap the data at two indices.protected final BigArrayvalues()The BigArray backing this sort.Methods inherited from class org.elasticsearch.search.sort.BucketedSortclose, debugFormat, forLeaf, getBucketSize, getFormat, getOrder, getValues, getValues, inHeapMode, initGatherOffsets
- 
Constructor Details- 
ForLongspublic ForLongs(BigArrays bigArrays, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra) 
 
- 
- 
Method Details- 
needsScorespublic final boolean needsScores()Description copied from class:BucketedSortDoes this sort need scores? Most don't, but sorting on_scoredoes.- Specified by:
- needsScoresin class- BucketedSort
 
- 
valuesDescription copied from class:BucketedSortThe BigArray backing this sort.- Specified by:
- valuesin class- BucketedSort
 
- 
growValuesprotected final void growValues(long minSize) Description copied from class:BucketedSortGrow the BigArray backing this sort to account for new buckets. This will only be called if the array is too small.- Specified by:
- growValuesin class- BucketedSort
 
- 
getNextGatherOffsetprotected final int getNextGatherOffset(long rootIndex) Description copied from class:BucketedSortGet the next index that should be "gathered" for a bucket rooted atrootIndex.- Specified by:
- getNextGatherOffsetin class- BucketedSort
 
- 
setNextGatherOffsetprotected final void setNextGatherOffset(long rootIndex, int offset) Description copied from class:BucketedSortSet the next index that should be "gathered" for a bucket rooted atrootIndex.- Specified by:
- setNextGatherOffsetin class- BucketedSort
 
- 
getValueDescription copied from class:BucketedSortGet the value at an index.- Specified by:
- getValuein class- BucketedSort
 
- 
betterThanprotected final boolean betterThan(long lhs, long rhs) Description copied from class:BucketedSorttrueif the entry at indexlhsis "better" than the entry atrhs. "Better" in this means "lower" forSortOrder.ASCand "higher" forSortOrder.DESC.- Specified by:
- betterThanin class- BucketedSort
 
- 
swapprotected final void swap(long lhs, long rhs) Description copied from class:BucketedSortSwap the data at two indices.- Specified by:
- swapin class- BucketedSort
 
 
-