|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectit.unimi.di.mg4j.index.AbstractIndexIterator
it.unimi.di.mg4j.index.QuasiSuccinctIndexReader.AbstractQuasiSuccinctIndexIterator
protected abstract static class QuasiSuccinctIndexReader.AbstractQuasiSuccinctIndexIterator
| Field Summary | |
|---|---|
protected int |
count
The count of the current posting, or -1 if it is not known. |
protected QuasiSuccinctIndexReader.CountReader |
counts
The count reader for the current term. |
protected LongBigList |
countsList
A reference to the data for counts, or null of hasCounts is false. |
protected int |
currentDocument
The current document. |
protected int |
currentTerm
The index of the current term. |
protected int |
frequency
The frequency of the current term. |
protected boolean |
hasCounts
Cached from index. |
protected boolean |
hasPositions
Cached from index. |
protected QuasiSuccinctIndex |
index
The index of indexReader, cached. |
protected QuasiSuccinctIndexReader |
indexReader
The index reader associated to this index iterator. |
protected int |
nextPosition
The number of returned positions for the current document. |
protected int |
numberOfDocuments
The number of documents (cached from index). |
protected long |
occurrency
The occurrency of the current term. |
protected LongBigList |
pointersList
A reference to the data for pointers. |
protected QuasiSuccinctIndexReader.LongWordBitReader |
pointersUpperBits
A longword bit reader used for the upper bits of pointers and to check whether a posting list is ranked or not. |
protected QuasiSuccinctIndexReader.PositionReader |
positions
The position reader for the current term. |
protected LongBigList |
positionsList
A reference to the data for positions, or null of hasPositions is false. |
| Fields inherited from class it.unimi.di.mg4j.index.AbstractIndexIterator |
|---|
id, term, weight |
| Fields inherited from interface it.unimi.di.mg4j.index.IndexIterator |
|---|
END_OF_POSITIONS |
| Fields inherited from interface it.unimi.di.mg4j.search.DocumentIterator |
|---|
END_OF_LIST |
| Constructor Summary | |
|---|---|
protected |
QuasiSuccinctIndexReader.AbstractQuasiSuccinctIndexIterator(QuasiSuccinctIndexReader indexReader)
|
| Method Summary | |
|---|---|
void |
dispose()
Disposes this document iterator, releasing all resources. |
int |
document()
Returns the last document returned by DocumentIterator.nextDocument(). |
int |
frequency()
Returns the frequency, that is, the number of documents that will be returned by this iterator. |
Index |
index()
Returns the index over which this iterator is built. |
ReferenceSet<Index> |
indices()
Returns the set of indices over which this iterator is built. |
IntervalIterator |
intervalIterator()
Returns the interval iterator of this document iterator for single-index queries. |
IntervalIterator |
intervalIterator(Index index)
Returns the interval iterator of this document iterator for the given index. |
Reference2ReferenceMap<Index,IntervalIterator> |
intervalIterators()
Returns an unmodifiable map from indices to interval iterators. |
int |
nextPosition()
Returns the next position at which the term appears in the current document. |
Payload |
payload()
Returns the payload, if any, associated with the current document. |
protected boolean |
ranked(int term)
|
int |
termNumber()
Returns the number of the term whose inverted list is returned by this index iterator. |
String |
toString()
|
| Methods inherited from class it.unimi.di.mg4j.index.AbstractIndexIterator |
|---|
accept, acceptOnTruePaths, id, id, term, term, weight, weight |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface it.unimi.di.mg4j.index.IndexIterator |
|---|
count |
| Methods inherited from interface it.unimi.di.mg4j.search.DocumentIterator |
|---|
mayHaveNext, nextDocument, skipTo |
| Field Detail |
|---|
protected final QuasiSuccinctIndexReader indexReader
protected final QuasiSuccinctIndex index
indexReader, cached.
protected final LongBigList pointersList
protected final LongBigList countsList
null of hasCounts is false.
protected final LongBigList positionsList
null of hasPositions is false.
protected final QuasiSuccinctIndexReader.LongWordBitReader pointersUpperBits
protected QuasiSuccinctIndexReader.CountReader counts
protected QuasiSuccinctIndexReader.PositionReader positions
protected final int numberOfDocuments
index).
protected final boolean hasCounts
index.
protected final boolean hasPositions
index.
protected int currentDocument
protected int frequency
protected long occurrency
protected int currentTerm
protected int count
protected int nextPosition
| Constructor Detail |
|---|
protected QuasiSuccinctIndexReader.AbstractQuasiSuccinctIndexIterator(QuasiSuccinctIndexReader indexReader)
| Method Detail |
|---|
protected boolean ranked(int term)
public Index index()
IndexIterator
public int termNumber()
IndexIteratorUsually, the term number is automatically set by IndexReader.documents(CharSequence) or IndexReader.documents(int).
IndexIterator.term()
public int frequency()
throws IOException
IndexIterator
IOException
public Payload payload()
throws IOException
IndexIterator
IOException
public int nextPosition()
throws IOException
IndexIterator
IndexIterator.END_OF_POSITIONS if there are no more positions.
IOExceptionpublic int document()
DocumentIteratorDocumentIterator.nextDocument().
DocumentIterator.nextDocument(), -1 if no document has been returned yet, and
DocumentIterator.END_OF_LIST if the list of results has been exhausted.
public Reference2ReferenceMap<Index,IntervalIterator> intervalIterators()
throws IOException
DocumentIteratorAfter a call to DocumentIterator.nextDocument(), this map
can be used to retrieve the intervals in the current document. An invocation of Map.get(java.lang.Object)
on this map with argument index yields the same result as
intervalIterator(index).
IOExceptionDocumentIterator.intervalIterator(Index)
public IntervalIterator intervalIterator()
throws IOException
DocumentIteratorThis is a commodity method that can be used only for queries built over a single index.
IOExceptionDocumentIterator.intervalIterator(Index)
public IntervalIterator intervalIterator(Index index)
throws IOException
DocumentIteratorAfter a call to DocumentIterator.nextDocument(), this iterator
can be used to retrieve the intervals in the current document (the
one returned by DocumentIterator.nextDocument()) for
the index index.
Note that if all indices have positions, it is guaranteed that at least one index will return an interval. However, for disjunctive queries it cannot be guaranteed that all indices will return an interval.
Indices without positions always return IntervalIterators.TRUE.
Thus, in presence of indices without positions it is possible that no
intervals at all are available.
index - an index (must be one over which the query was built).
index.
IOExceptionpublic ReferenceSet<Index> indices()
DocumentIterator
public String toString()
toString in class Object
public void dispose()
throws IOException
DocumentIteratorThis method should propagate down to the underlying index iterators, where it should release resources such as open files and network connections. If you're doing your own resource tracking and pooling, then you do not need to call this method.
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||