org.apache.lucene.gdata.search.index
Interface 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. IndexDocumentBuilderTask passed to the GDataIndexer task queue produce instances of this interface concurrently.

Author:
Simon Willnauer

Field Summary
static String FIELD_ENTRY_ID
          the index field to identify a document in the index.
static String FIELD_FEED_ID
          the index field to associate a document with a specific feed
static String GDATA_MANDATORY_FIELD_CATEGORY
           
static String GDATA_MANDATORY_FIELD_UPDATED
           
 
Method Summary
 boolean commitAfter()
          Indicates that the index should be commited after this document has been processed
 Term getDeletealbe()
           
 Document getWriteable()
           
 boolean isDelete()
           
 boolean isInsert()
           
 boolean isUpdate()
           
 boolean optimizeAfter()
          Indicates that the index should be optimized after this document has been processed
 

Field Detail

FIELD_ENTRY_ID

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

See Also:
Constant Field Values

FIELD_FEED_ID

static final String FIELD_FEED_ID
the index field to associate a document with a specific feed

See Also:
Constant Field Values

GDATA_MANDATORY_FIELD_UPDATED

static final String GDATA_MANDATORY_FIELD_UPDATED
See Also:
Constant Field Values

GDATA_MANDATORY_FIELD_CATEGORY

static final String GDATA_MANDATORY_FIELD_CATEGORY
See Also:
Constant Field Values
Method Detail

isUpdate

boolean isUpdate()
Returns:
true if and only if this document is an update, otherwise false

isDelete

boolean isDelete()
Returns:
true if and only if this document is a delete, otherwise false

isInsert

boolean isInsert()
Returns:
true if and only if this document is an insert, otherwise false

getWriteable

Document getWriteable()
Returns:
- the lucene document to write to the index if the action is insert or updated, otherwise it will return null;

getDeletealbe

Term getDeletealbe()
Returns:
- a term that identifies this document in the index to delete this document on a update or delete

commitAfter

boolean commitAfter()
Indicates that the index should be commited after this document has been processed

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

optimizeAfter

boolean optimizeAfter()
Indicates that the index should be optimized after this document has been processed

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


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.