public static class MultiDocValues.OrdinalMap extends Object implements Accountable
Modifier and Type | Field and Description |
---|---|
Object |
owner
Cache key of whoever asked for this awful thing
|
Modifier and Type | Method and Description |
---|---|
static MultiDocValues.OrdinalMap |
build(Object owner,
SortedDocValues[] values,
float acceptableOverheadRatio)
Create an ordinal map that uses the number of unique values of each
SortedDocValues instance as a weight. |
static MultiDocValues.OrdinalMap |
build(Object owner,
SortedSetDocValues[] values,
float acceptableOverheadRatio)
Create an ordinal map that uses the number of unique values of each
SortedSetDocValues instance as a weight. |
static MultiDocValues.OrdinalMap |
build(Object owner,
TermsEnum[] subs,
long[] weights,
float acceptableOverheadRatio)
Creates an ordinal map that allows mapping ords to/from a merged
space from
subs . |
Collection<Accountable> |
getChildResources()
Returns nested resources of this class.
|
int |
getFirstSegmentNumber(long globalOrd)
Given a global ordinal, returns the index of the first
segment that contains this term.
|
long |
getFirstSegmentOrd(long globalOrd)
Given global ordinal, returns the ordinal of the first segment which contains
this ordinal (the corresponding to the segment return
getFirstSegmentNumber(long) ). |
LongValues |
getGlobalOrds(int segmentIndex)
Given a segment number, return a
LongValues instance that maps
segment ordinals to global ordinals. |
long |
getValueCount()
Returns the total number of unique terms in global ord space.
|
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
public final Object owner
public static MultiDocValues.OrdinalMap build(Object owner, SortedDocValues[] values, float acceptableOverheadRatio) throws IOException
SortedDocValues
instance as a weight.IOException
build(Object, TermsEnum[], long[], float)
public static MultiDocValues.OrdinalMap build(Object owner, SortedSetDocValues[] values, float acceptableOverheadRatio) throws IOException
SortedSetDocValues
instance as a weight.IOException
build(Object, TermsEnum[], long[], float)
public static MultiDocValues.OrdinalMap build(Object owner, TermsEnum[] subs, long[] weights, float acceptableOverheadRatio) throws IOException
subs
.owner
- a cache keysubs
- TermsEnums that support TermsEnum.ord()
. They need
not be dense (e.g. can be FilteredTermsEnums}.weights
- a weight for each sub. This is ideally correlated with
the number of unique terms that each sub introduces compared
to the other subsIOException
- if an I/O error occurred.public LongValues getGlobalOrds(int segmentIndex)
LongValues
instance that maps
segment ordinals to global ordinals.public long getFirstSegmentOrd(long globalOrd)
getFirstSegmentNumber(long)
).public int getFirstSegmentNumber(long globalOrd)
public long getValueCount()
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
public Collection<Accountable> getChildResources()
Accountable
getChildResources
in interface Accountable
Accountables
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.