Summary
Public Methods |
final
void
|
close()
Frees associated resources.
|
final
int
|
doc()
Returns the current document number.
|
final
int
|
freq()
Returns the frequency of the term within the current document.
|
byte[]
|
getPayload(byte[] data, int offset)
Not implemented.
|
int
|
getPayloadLength()
Not implemented.
|
boolean
|
isPayloadAvailable()
Checks if a payload can be loaded at this position.
|
final
boolean
|
next()
Moves to the next pair in the enumeration.
|
final
int
|
nextPosition()
Returns next position in the current document.
|
int
|
read(int[] arg0, int[] arg1)
Not implemented.
|
void
|
seek(TermEnum termEnum)
Not implemented.
|
void
|
seek(Term arg0)
Not implemented.
|
final
boolean
|
skipTo(int target)
Skips entries to the first beyond the current whose document number is
greater than or equal to target.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
java.io.Closeable
|
From interface
org.apache.lucene.index.TermDocs
abstract
void
|
close()
Frees associated resources.
|
abstract
int
|
doc()
Returns the current document number.
|
abstract
int
|
freq()
Returns the frequency of the term within the current document.
|
abstract
boolean
|
next()
Moves to the next pair in the enumeration.
|
abstract
int
|
read(int[] docs, int[] freqs)
Attempts to read multiple entries from the enumeration, up to length of
docs.
|
abstract
void
|
seek(TermEnum termEnum)
Sets this to the data for the current term in a TermEnum .
|
abstract
void
|
seek(Term term)
Sets this to the data for a term.
|
abstract
boolean
|
skipTo(int target)
Skips entries to the first beyond the current whose document number is
greater than or equal to target.
|
|
From interface
org.apache.lucene.index.TermPositions
abstract
byte[]
|
getPayload(byte[] data, int offset)
Returns the payload data at the current term position.
|
abstract
int
|
getPayloadLength()
Returns the length of the payload at the current term position.
|
abstract
boolean
|
isPayloadAvailable()
Checks if a payload can be loaded at this position.
|
abstract
int
|
nextPosition()
Returns next position in the current document.
|
|
Public Constructors
public
MultipleTermPositions
(IndexReader indexReader, Term[] terms)
Creates a new MultipleTermPositions
instance.
Public Methods
public
final
void
close
()
Frees associated resources.
public
final
int
doc
()
Returns the current document number.
This is invalid until next()
is called for the first time.
public
final
int
freq
()
Returns the frequency of the term within the current document.
This
is invalid until next()
is called for the first time.
public
byte[]
getPayload
(byte[] data, int offset)
Parameters
data
| the array into which the data of this payload is to be
stored, if it is big enough; otherwise, a new byte[] array
is allocated for this purpose. |
offset
| the offset in the array into which the data of this payload
is to be stored. |
Returns
- a byte[] array containing the data of this payload
public
int
getPayloadLength
()
Returns
- length of the current payload in number of bytes
public
boolean
isPayloadAvailable
()
Checks if a payload can be loaded at this position.
Payloads can only be loaded once per call to
nextPosition()
.
public
final
boolean
next
()
Moves to the next pair in the enumeration.
Returns true iff there is
such a next pair in the enumeration.
public
final
int
nextPosition
()
Returns next position in the current document. It is an error to call
this more than freq()
times
without calling next()
This is
invalid until next()
is called for
the first time.
public
int
read
(int[] arg0, int[] arg1)
public
void
seek
(Term arg0)
public
final
boolean
skipTo
(int target)
Skips entries to the first beyond the current whose document number is
greater than or equal to target.
Returns true iff there is such
an entry.
Behaves as if written:
boolean skipTo(int target) {
do {
if (!next())
return false;
} while (target > doc());
return true;
}
Some implementations are considerably more efficient than that.