FileDocCategorySizeDatePackage
IndexDocument.javaAPI DocApache Lucene 2.1.03437Wed Feb 14 10:46:06 GMT 2007org.apache.lucene.gdata.search.index

IndexDocument

public interface IndexDocument
IndexDocument encapsulates the acual entity to store, update or delete. All infomation to process the action on this document are provided via this interface.

This enables the GDataIndexer to index every kind of document. All the processing of the original document happens somewhere behind this facade. {@link org.apache.lucene.gdata.search.index.IndexDocumentBuilderTask} passed to the {@link org.apache.lucene.gdata.search.index.GDataIndexer} task queue produce instances of this interface concurrently.

author
Simon Willnauer

Fields Summary
public static final String
FIELD_ENTRY_ID
the index field to identify a document in the index. This acts as a primary key to fetch the entire entry from the storage
public static final String
FIELD_FEED_ID
the index field to associate a document with a specific feed
public static final String
GDATA_MANDATORY_FIELD_UPDATED
public static final String
GDATA_MANDATORY_FIELD_CATEGORY
Constructors Summary
Methods Summary
public abstract booleancommitAfter()
Indicates that the index should be commited after this document has been processed

return
true if the index should be commited after this document, otherwise false

public abstract org.apache.lucene.index.TermgetDeletealbe()

return
- a term that identifies this document in the index to delete this document on a update or delete

public abstract org.apache.lucene.document.DocumentgetWriteable()

return
- the lucene document to write to the index if the action is insert or updated, otherwise it will return null;

public abstract booleanisDelete()

return
true if and only if this document is a delete, otherwise false

public abstract booleanisInsert()

return
true if and only if this document is an insert, otherwise false

public abstract booleanisUpdate()

return
true if and only if this document is an update, otherwise false

public abstract booleanoptimizeAfter()
Indicates that the index should be optimized after this document has been processed

return
true if the index should be optimized after this document, otherwise false