| java.lang.Object java.lang.Thread com.Yasna.forum.database.DbSearchIndexer
DbSearchIndexer | public class DbSearchIndexer extends Thread implements SearchIndexer(Code) | | Database implementation of SearchIndexer using the Lucene search package.
Search indexes are stored in the "search" subdirectory of directory pointed to
by the Yazd property "yazdHome".
|
DbSearchIndexer | public DbSearchIndexer(DbForumFactory factory)(Code) | | Creates a new DbSearchIndexer. It attempts to load properties for
the update interval and when the last index occured from the Yazd
properties then starts the indexing thread.
|
addMessageToIndex | final protected void addMessageToIndex(IndexWriter writer, int messageID, String subject, String body, int userID, int threadID, int forumID, java.util.Date creationDate) throws IOException(Code) | | Indexes an indivual message. The connection is assumed to be open when
passed in and will remain open after the method is done executing.
|
deleteMessagesFromIndex | final protected void deleteMessagesFromIndex(int[] messages) throws IOException(Code) | | Deletes a message from the index.
|
getHoursUpdateInterval | public int getHoursUpdateInterval()(Code) | | |
getMinutesUpdateInterval | public int getMinutesUpdateInterval()(Code) | | |
isAutoIndexEnabled | public boolean isAutoIndexEnabled()(Code) | | |
rebuildIndex | public void rebuildIndex()(Code) | | |
rebuildIndex | final protected void rebuildIndex(long end)(Code) | | Rebuilds the search index from scratch. It deletes the entire index
and word tables and then indexes every message up to the end time.
|
run | public void run()(Code) | | Indexing thread logic. It wakes up once a minute to see if any threaded
action should take place.
|
setAutoIndexEnabled | public void setAutoIndexEnabled(boolean value)(Code) | | |
setUpdateInterval | public void setUpdateInterval(int minutes, int hours)(Code) | | |
updateIndex | public void updateIndex()(Code) | | |
updateIndex | final protected void updateIndex(long start, long end)(Code) | | Updates the index. It first deletes any messages in the index between
the start and end times, and then adds all messages to the index that
are between the start and end times.
|
|
|