|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.unimi.di.mg4j.index.AbstractIndexReader it.unimi.di.mg4j.index.BitStreamHPIndexReader
public class BitStreamHPIndexReader
A bitstream-based index reader for high-performance indices.
Nested Class Summary | |
---|---|
protected static class |
BitStreamHPIndexReader.BitStreamHPIndexReaderIndexIterator
|
Field Summary | |
---|---|
protected BitStreamHPIndex |
index
The reference index. |
protected BitStreamHPIndexReader.BitStreamHPIndexReaderIndexIterator |
indexIterator
The BitStreamHPIndexReader.BitStreamHPIndexReaderIndexIterator view of this reader (returned by documents(CharSequence) ). |
Fields inherited from class it.unimi.di.mg4j.index.AbstractIndexReader |
---|
closed |
Constructor Summary | |
---|---|
BitStreamHPIndexReader(BitStreamHPIndex index,
InputBitStream ibs,
InputBitStream positions)
Creates a new skip index reader, with the specified underlying Index and input bit
stream. |
Method Summary | |
---|---|
void |
close()
|
IndexIterator |
documents(CharSequence term)
Returns an index iterator over the documents containing a term; the term is given explicitly. |
IndexIterator |
documents(int term)
Returns a document iterator over the documents containing a term. |
IndexIterator |
nextIterator()
Throws an UnsupportedOperationException . |
String |
toString()
|
Methods inherited from class it.unimi.di.mg4j.index.AbstractIndexReader |
---|
finalize |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final BitStreamHPIndex index
protected final BitStreamHPIndexReader.BitStreamHPIndexReaderIndexIterator indexIterator
BitStreamHPIndexReader.BitStreamHPIndexReaderIndexIterator
view of this reader (returned by documents(CharSequence)
).
Constructor Detail |
---|
public BitStreamHPIndexReader(BitStreamHPIndex index, InputBitStream ibs, InputBitStream positions)
Index
and input bit
stream.
index
- the index.ibs
- the underlying bit stream.Method Detail |
---|
public IndexIterator documents(int term) throws IOException
IndexReader
Note that the index iterator returned by this method will
return null
on a call to term()
.
Note that it is always possible to call this method with argument 0, even if the underlying index does not provide random access.
term
- the number of a term.
IOException
public IndexIterator documents(CharSequence term) throws IOException
IndexReader
Unless the term processor of
the associated index is null
, words coming from a query will
have to be processed before being used with this method.
Note that the index iterator returned by this method will
return term
on a call to term()
.
term
- a term (the term will be downcased if the index is case insensitive).
IOException
public IndexIterator nextIterator() throws IOException
AbstractIndexReader
UnsupportedOperationException
.
nextIterator
in interface IndexReader
nextIterator
in class AbstractIndexReader
null
if there are no more terms
after the current one.
IOException
public String toString()
toString
in class Object
public void close() throws IOException
close
in interface Closeable
close
in class AbstractIndexReader
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |