| com.Yasna.forum.SearchIndexer
All known Subclasses: com.Yasna.forum.database.DbSearchIndexer,
SearchIndexer | public interface SearchIndexer (Code) | | Defines properties of the Yazd indexer for searching. Indexing can either
be done real-time by calling indexMessage() every time a new message is
created, or by running the indexer in timed update mode. The latter mode
is probably preferable since it allows for faster message posting.
The automated updating mode can be adjusted by setting how often batch
indexing is done. You can adjust this interval to suit the needs of your
forums. Frequent updates mean that messages will be searchable more quickly.
Less frequent updates use fewer system resources.
See Also: ForumFactory.getSearchIndexer |
addToIndex | public void addToIndex(ForumMessage message)(Code) | | Adds an individual message to the index. This method is useful for doing
real-time indexing. However, for maximum posting speed this method can
be ignored. In that case, the automatic indexer will pick up all new
messages at the next index interval.
Parameters: message - the message to add to the index. |
getHoursUpdateInterval | public int getHoursUpdateInterval()(Code) | | Returns the number of hours that the indexer waits between each update.
the number of hours between automatic index updates. |
getLastIndexedDate | public Date getLastIndexedDate()(Code) | | Returns the date that the last update to the index was made.
|
getMinutesUpdateInterval | public int getMinutesUpdateInterval()(Code) | | Returns the number of minutes that the indexer waits between each update.
the number of minutes between automatic index updates. |
isAutoIndexEnabled | public boolean isAutoIndexEnabled()(Code) | | Returns true if auto indexing is turned on. When auto indexing is on, it
will update the search index at the interval specified by the
setUpdateInterval method.
true if auto indexing is turned on. |
rebuildIndex | public void rebuildIndex()(Code) | | Manually rebuild the entire index. This operation can be slow if the
index is large.
|
removeFromIndex | public void removeFromIndex(ForumMessage message)(Code) | | Removes an individual message from the index.
Parameters: message - the message to remove from the index. |
setAutoIndexEnabled | public void setAutoIndexEnabled(boolean value)(Code) | | Enables or disables auto indexing. When auto indexing is on, it
will update the search index at the interval specified by the
setUpdateInterval method.
Parameters: value - true to turn auto indexing on, false to turn it off. |
setUpdateInterval | public void setUpdateInterval(int minutes, int hours)(Code) | | Sets the amount of time that indexer should wait between updating the
index.
Parameters: minutes - the number of minutes between automatic index updates. Parameters: hours - the number of hours between automatic index updates. |
updateIndex | public void updateIndex()(Code) | | Manually update the index to include all new messages since the last
update.
|
|
|