org.tigris.eyebrowse
Interface IIndexer

All Known Implementing Classes:
LuceneIndexer

public interface IIndexer

interface IIndexer Interface used to separate the implementation of the text indexing engine from the rest of Eyebrowse. Clients will create an object implementing Indexer for searching, updating, or creating the index. The location of the index store will be specified through the constructor.

Since:
1.0
Author:
Brian Goetz - Quiotix Corp

Method Summary
 void close()
          Close the indexer, and write any unsaved information to the index.
 void createIndex()
          Create the text index store.
 void indexMessage(java.lang.String msgName, org.tigris.eyebrowse.MimeMessage message)
          Called when IndexMaint.updateIndex finds a new message.
 java.lang.String[] search(java.lang.String searchText)
          Search the index for text matching the specified search text from message bodies.
 java.lang.String[] search(java.lang.String searchText, java.lang.String defaultField)
          Search the index for text matching the specified search text.
 

Method Detail

indexMessage

public void indexMessage(java.lang.String msgName,
                         org.tigris.eyebrowse.MimeMessage message)
                  throws IndexerException
Called when IndexMaint.updateIndex finds a new message.
Parameters:
msgName - The name which identifies the message to eyebrowse. This is the name that should be returned by the search method when identifying search results.
message - A JavaMail MimeMessage message.
Throws:
IndexerException -  

close

public void close()
           throws IndexerException
Close the indexer, and write any unsaved information to the index.
Throws:
IndexerException -  

search

public java.lang.String[] search(java.lang.String searchText)
                          throws IndexerException
Search the index for text matching the specified search text from message bodies.
Parameters:
searchText - A search query, the format of which is specific to the search engine being used.
Returns:
A list of message names which match the query, in relevance order (if the search engine supports relevance matching.)
Throws:
IndexerException -  

search

public java.lang.String[] search(java.lang.String searchText,
                                 java.lang.String defaultField)
                          throws IndexerException
Search the index for text matching the specified search text.
Parameters:
searchText - A list of message names which match the query, in relevance order (if the search engine supports relevance matching.)
defaultField - If the search engine supports multiple field searching, this specifies the name of the default field to search.
Returns:
A list of message names which match the query, in relevance order (if the search engine supports relevance matching.)
Throws:
IndexerException -  

createIndex

public void createIndex()
                 throws IndexerException
Create the text index store. The location of the index store is specified through the constructor.
Throws:
IndexerException -  


Copyright © 2000 Quiotix Corp. All Rights Reserved.