gate.creole.annic
Interface Indexer

All Known Implementing Classes:
LuceneIndexer

public interface Indexer

Base interface that declares methods for the Indexer.

Author:
niraj

Method Summary
 void add(String corpusPersistenceID, List<Document> addedDocuments)
          Add new documents to Index
 void createIndex(Map parameters)
          Create a Index
 void deleteIndex()
          Delete all index files and directories in index location.
 Corpus getCorpus()
          Corpus to be indexed
 Map getParameters()
          Returns the parameters
 void optimizeIndex()
          Optimize the existing index
 void remove(List removedDocumentPersistenceIds)
          remove documents from the Index
 void setCorpus(Corpus corpus)
          Set the corpus to be indexed
 

Method Detail

createIndex

void createIndex(Map parameters)
                 throws IndexException
Create a Index

Parameters:
parameters - - parameters needed for creating an index values depend on the implementing IndexManager
Throws:
IndexException

optimizeIndex

void optimizeIndex()
                   throws IndexException
Optimize the existing index

Throws:
IndexException

deleteIndex

void deleteIndex()
                 throws IndexException
Delete all index files and directories in index location.

Throws:
IndexException

add

void add(String corpusPersistenceID,
         List<Document> addedDocuments)
         throws IndexException
Add new documents to Index

Parameters:
corpusPersistenceID -
addedDocuments -
Throws:
IndexException

remove

void remove(List removedDocumentPersistenceIds)
            throws IndexException
remove documents from the Index

Parameters:
removedDocumentPersistenceIds -
Throws:
Exception
IndexException

setCorpus

void setCorpus(Corpus corpus)
               throws IndexException
Set the corpus to be indexed

Parameters:
corpus -
Throws:
IndexException

getCorpus

Corpus getCorpus()
Corpus to be indexed


getParameters

Map getParameters()
Returns the parameters