Class DocumentalClusterIndexReader
- java.lang.Object
-
- it.unimi.di.big.mg4j.index.AbstractIndexReader
-
- it.unimi.di.big.mg4j.index.cluster.AbstractIndexClusterIndexReader
-
- it.unimi.di.big.mg4j.index.cluster.DocumentalClusterIndexReader
-
- All Implemented Interfaces:
IndexReader,SafelyCloseable,Closeable,AutoCloseable
public class DocumentalClusterIndexReader extends AbstractIndexClusterIndexReader
An index reader for aDocumentalCluster. It dispatches the correctIndexReaderdepending on the concrete subclass ofDocumentalCluster.- Author:
- Sebastiano Vigna
-
-
Field Summary
Fields Modifier and Type Field Description protected DocumentalClusterindexThe index this reader refers to.-
Fields inherited from class it.unimi.di.big.mg4j.index.cluster.AbstractIndexClusterIndexReader
indexReader
-
Fields inherited from class it.unimi.di.big.mg4j.index.AbstractIndexReader
closed
-
-
Constructor Summary
Constructors Constructor Description DocumentalClusterIndexReader(DocumentalCluster index, int bufferSize)
-
Method Summary
Modifier and Type Method Description IndexIteratordocuments(long term)Returns a document iterator over the documents containing a term.IndexIteratordocuments(CharSequence term)Returns an index iterator over the documents containing a term; the term is given explicitly.-
Methods inherited from class it.unimi.di.big.mg4j.index.cluster.AbstractIndexClusterIndexReader
close
-
Methods inherited from class it.unimi.di.big.mg4j.index.AbstractIndexReader
finalize, nextIterator
-
-
-
-
Field Detail
-
index
protected final DocumentalCluster index
The index this reader refers to.
-
-
Constructor Detail
-
DocumentalClusterIndexReader
public DocumentalClusterIndexReader(DocumentalCluster index, int bufferSize) throws IOException
- Throws:
IOException
-
-
Method Detail
-
documents
public IndexIterator documents(long term) throws IOException
Description copied from interface:IndexReaderReturns a document iterator over the documents containing a term.Note that the index iterator returned by this method will return
nullon a call toterm().Note that it is always possible to call this method with argument 0, even if the underlying index does not provide random access.
- Parameters:
term- the number of a term.- Throws:
IOException
-
documents
public IndexIterator documents(CharSequence term) throws IOException
Description copied from interface:IndexReaderReturns an index iterator over the documents containing a term; the term is given explicitly.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
termon a call toterm().- Parameters:
term- a term (the term will be downcased if the index is case insensitive).- Throws:
IOException
-
-