Package org.terrier.realtime
Interface UpdatableIndex
-
- All Known Implementing Classes:
IncrementalIndex,MemoryFields,MemoryFieldsIndex,MemoryIndex
public interface UpdatableIndexInterface 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 booleanaddToDocument(int docid, Document doc)Adds specified content contents to the named document id.booleanaddToDocument(int docid, DocumentPostingList docContents)Adds relevant terms to the named document id.voidindexDocument(java.util.Map<java.lang.String,java.lang.String> docProperties, DocumentPostingList docContents)Add a new pre-parsed document to the index.voidindexDocument(Document doc)Add a new document to the index.booleanremoveDocument(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.ExceptionAdd 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.ExceptionAdds 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.ExceptionAdds relevant terms to the named document id.- Returns:
- true if supported & successful.
- Throws:
java.lang.Exception
-
-