net.ontopia.infoset.fulltext.core
Interface IndexerIF

All Known Implementing Classes:
DefaultIndexerManager, LuceneIndexer, ThreadedIndexerManager

public interface IndexerIF

INTERNAL: Represents a search engine indexer. Instances of this class are able to index documents and generate an index which can be used for searching those documents.


Method Summary
 void close()
          INTERNAL: Closes the indexer.
 void delete()
          INTERNAL: Deletes the index.
 int delete(java.lang.String field, java.lang.String value)
          INTERNAL: Removes all documents with the specified field value from the index.
 void flush()
          INTERNAL: Flushes all changes done to the index.
 void index(DocumentIF document)
          INTERNAL: Indexes the specified document.
 

Method Detail

index

void index(DocumentIF document)
           throws java.io.IOException
INTERNAL: Indexes the specified document. This includes tokenizing, indexing and storing the document fields.

Throws:
java.io.IOException

delete

int delete(java.lang.String field,
           java.lang.String value)
           throws java.io.IOException
INTERNAL: Removes all documents with the specified field value from the index. This method should generally be, but is not limited to, used to delete documents by their identity field.

Returns:
The number of documents that was deleted from the index. -1 is return if this number is unknown.
Throws:
java.io.IOException

flush

void flush()
           throws java.io.IOException
INTERNAL: Flushes all changes done to the index. A flushing operation can include actions like persisting changes and optimizing the index.

Throws:
java.io.IOException

delete

void delete()
            throws java.io.IOException
INTERNAL: Deletes the index. The indexer is closed after this method returns. Note that some indexers might not support this operation.

Throws:
java.io.IOException
Since:
1.3

close

void close()
           throws java.io.IOException
INTERNAL: Closes the indexer. After the indexer has been closed it cannot (generally) be reopened.

Throws:
java.io.IOException


Copyright © 2000-2012 Ontopia.