- java.lang.Object
-
- org.apache.lucene.index.TermsEnumIndex
-
- Direct Known Subclasses:
MultiTermsEnum.TermsEnumWithSlice
class TermsEnumIndex extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
TermsEnumIndex.TermState
Wrapper around a term that allows for quick equals comparisons.
-
Field Summary
Fields Modifier and Type Field Description private BytesRef
currentTerm
private long
currentTermPrefix8
(package private) static TermsEnumIndex[]
EMPTY_ARRAY
(package private) int
subIndex
(package private) TermsEnum
termsEnum
-
Constructor Summary
Constructors Constructor Description TermsEnumIndex(TermsEnum termsEnum, int subIndex)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
compareTermTo(TermsEnumIndex that)
(package private) BytesRef
next()
(package private) static long
prefix8ToComparableUnsignedLong(BytesRef term)
Copy the first 8 bytes of the given term as a comparable unsigned long.(package private) void
reset(TermsEnumIndex tei)
(package private) TermsEnum.SeekStatus
seekCeil(BytesRef term)
(package private) void
seekExact(long ord)
(package private) boolean
seekExact(BytesRef term)
private void
setTerm(BytesRef term)
(package private) BytesRef
term()
(package private) boolean
termEquals(TermsEnumIndex.TermState that)
java.lang.String
toString()
-
-
-
Field Detail
-
EMPTY_ARRAY
static final TermsEnumIndex[] EMPTY_ARRAY
-
subIndex
final int subIndex
-
termsEnum
TermsEnum termsEnum
-
currentTerm
private BytesRef currentTerm
-
currentTermPrefix8
private long currentTermPrefix8
-
-
Constructor Detail
-
TermsEnumIndex
TermsEnumIndex(TermsEnum termsEnum, int subIndex)
-
-
Method Detail
-
prefix8ToComparableUnsignedLong
static long prefix8ToComparableUnsignedLong(BytesRef term)
Copy the first 8 bytes of the given term as a comparable unsigned long. In case the term has less than 8 bytes, missing bytes will be replaced with zeroes. Note that two terms that produce the same long could still be different due to the fact that missing bytes are replaced with zeroes, e.g.[1, 0]
and[1]
get mapped to the same long.
-
term
BytesRef term()
-
setTerm
private void setTerm(BytesRef term)
-
next
BytesRef next() throws java.io.IOException
- Throws:
java.io.IOException
-
seekCeil
TermsEnum.SeekStatus seekCeil(BytesRef term) throws java.io.IOException
- Throws:
java.io.IOException
-
seekExact
boolean seekExact(BytesRef term) throws java.io.IOException
- Throws:
java.io.IOException
-
seekExact
void seekExact(long ord) throws java.io.IOException
- Throws:
java.io.IOException
-
reset
void reset(TermsEnumIndex tei) throws java.io.IOException
- Throws:
java.io.IOException
-
compareTermTo
int compareTermTo(TermsEnumIndex that)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
termEquals
boolean termEquals(TermsEnumIndex.TermState that)
-
-