Package org.terrier.realtime
Interface UpdatableIndex
-
- All Known Implementing Classes:
IncrementalIndex
,MemoryFields
,MemoryFieldsIndex
,MemoryIndex
public interface UpdatableIndex
Interface describing an index that can be updated- Since:
- 4.0
- Author:
- Richard McCreadie
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addToDocument(int docid, Document doc)
Adds specified content contents to the named document id.boolean
addToDocument(int docid, DocumentPostingList docContents)
Adds relevant terms to the named document id.void
indexDocument(java.util.Map<java.lang.String,java.lang.String> docProperties, DocumentPostingList docContents)
Add a new pre-parsed document to the index.void
indexDocument(Document doc)
Add a new document to the index.boolean
removeDocument(int docid)
Removes a document from the index.
-
-
-
Method Detail
-
indexDocument
void indexDocument(Document doc) throws java.lang.Exception
Add a new document to the index.- Throws:
java.lang.Exception
-
indexDocument
void indexDocument(java.util.Map<java.lang.String,java.lang.String> docProperties, DocumentPostingList docContents) throws java.lang.Exception
Add a new pre-parsed document to the index.- Throws:
java.lang.Exception
-
removeDocument
boolean removeDocument(int docid)
Removes a document from the index. Returns true if successful. No known operable implementations at this time.
-
addToDocument
boolean addToDocument(int docid, Document doc) throws java.lang.Exception
Adds specified content contents to the named document id.- Returns:
- true if supported & successful.
- Throws:
java.lang.Exception
-
addToDocument
boolean addToDocument(int docid, DocumentPostingList docContents) throws java.lang.Exception
Adds relevant terms to the named document id.- Returns:
- true if supported & successful.
- Throws:
java.lang.Exception
-
-