public static class MultiDocValues.OrdinalMap extends Object implements Accountable
Constructor and Description |
---|
MultiDocValues.OrdinalMap(Object owner,
TermsEnum[] subs)
Create an
MultiDocValues.OrdinalMap with the default overhead ratio. |
MultiDocValues.OrdinalMap(Object owner,
TermsEnum[] subs,
float acceptableOverheadRatio)
Creates an ordinal map that allows mapping ords to/from a merged
space from
subs . |
Modifier and Type | Method and Description |
---|---|
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 MultiDocValues.OrdinalMap(Object owner, TermsEnum[] subs, float acceptableOverheadRatio) throws IOException
subs
.owner
- a cache keysubs
- TermsEnums that support TermsEnum.ord()
. They need
not be dense (e.g. can be FilteredTermsEnums}.IOException
- if an I/O error occurred.public MultiDocValues.OrdinalMap(Object owner, TermsEnum[] subs) throws IOException
MultiDocValues.OrdinalMap
with the default overhead ratio.IOException
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
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.