|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.di.mg4j.index.AbstractIndexReader
it.unimi.di.mg4j.index.remote.RemoteIndexReader
public class RemoteIndexReader
An index reader for RemoteIndex
.
Nested Class Summary | |
---|---|
static class |
RemoteIndexReader.ServerThread
|
Field Summary | |
---|---|
protected RemoteIndexServerConnection |
connection
The remote server connection used to call the index server. |
protected Index |
index
The index we refer to. |
protected DataInputStream |
inputStream
The input stream in connection , cached. |
protected DataOutputStream |
outputStream
The output stream in connection , cached. |
protected it.unimi.di.mg4j.index.remote.RemoteIndexReader.RemoteIndexReaderIndexIterator |
remoteIndexIterator
The index iterator associated with this reader. |
Fields inherited from class it.unimi.di.mg4j.index.AbstractIndexReader |
---|
closed |
Constructor Summary | |
---|---|
RemoteIndexReader(RemoteIndex index,
int bufferSize)
|
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 termNumber)
Returns a document iterator over the documents containing a term. |
protected void |
finalize()
|
Methods inherited from class it.unimi.di.mg4j.index.AbstractIndexReader |
---|
nextIterator |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Index index
protected final RemoteIndexServerConnection connection
protected final it.unimi.di.mg4j.index.remote.RemoteIndexReader.RemoteIndexReaderIndexIterator remoteIndexIterator
protected final DataInputStream inputStream
connection
, cached.
protected final DataOutputStream outputStream
connection
, cached.
Constructor Detail |
---|
public RemoteIndexReader(RemoteIndex index, int bufferSize) throws IOException
IOException
Method Detail |
---|
public void close() throws IOException, IllegalStateException
close
in interface Closeable
close
in class AbstractIndexReader
IOException
IllegalStateException
protected void finalize() throws Throwable
finalize
in class AbstractIndexReader
Throwable
public IndexIterator documents(int termNumber) 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.
termNumber
- 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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |