|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IndexService
Document
indexing service. Indexes a Document
into either
a persistent or in-memory index.
The IndexService
interface does not allow for retrieval. Rather
this should handled through another service, such as the
DocumentRetrievalService
.
Method Summary | |
---|---|
void |
finish()
Indicates that the indexing process is finished or has reached some checkpoint stage. |
Document |
get(String docID)
Loads the Document with the given docID from the index. |
void |
index(Document document)
Indexes the given Document . |
void |
remove(String documentID)
Removes the Document with the given docID from the index. |
void |
setPath(String path)
Sets the location of the index. |
Methods inherited from interface com.languagecomputer.api.Service |
---|
getName, setSession |
Method Detail |
---|
void setPath(String path) throws IOException
index(Document)
. Calls to
remove(String)
and get(String)
, however, should throw an
IOException
. This is an optional operation.
path
- The path to the index.
IOException
- If there is an issue accessing any I/O component
required by the IndexService
. Implementors may or may not
validate the path and throw an exception if it is inaccessible.void index(Document document) throws IOException
Document
. This should now be retrievable using
#getDocument(String)
. If no index currently exists at the location
given to setPath(String)
, a new index should be created.
document
- The Document
to index.
IOException
- If there is an issue accessing any I/O component
required by the IndexService
.void finish() throws IOException
finish
is called is left up to the
implementation.
IOException
- If there is an issue accessing any I/O component
required by the IndexService
.void remove(String documentID) throws IOException
Document
with the given docID from the index.
docID
- Unique identifier for the Document
.
IOException
- If there is an issue accessing any I/O component
required by the IndexService
.Document get(String docID) throws IOException
Document
with the given docID from the index.
docID
- Unique identifier for the Document
.
Document
with the given docID, or
null
if there is no such document in the index or if this
operation is not supported.
IOException
- If there is an issue accessing any I/O component
required by the IndexService
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |