\FinderIndexerDriverMysql
Indexer class supporting MySQL(i) for the Finder indexer package.
The indexer class provides the core functionality of the Finder
search engine. It is responsible for adding and updating the
content links table; extracting and scoring tokens; and maintaining
all referential information for the content.
Note: All exceptions thrown from within this class should be caught
by the controller.
Synopsis
class FinderIndexerDriverMysql
extends FinderIndexer
{
- // Inherited constants from FinderIndexer
- const TITLE_CONTEXT = 1;
- const TEXT_CONTEXT = 2;
- const META_CONTEXT = 3;
- const PATH_CONTEXT = 4;
- const MISC_CONTEXT = 5;
- // methods
- public integer index()
- public boolean remove()
- public boolean optimize()
- protected integer addTokensToDB()
- protected boolean toggleTables()
- // Inherited methods from FinderIndexer
- public static FinderIndexer getInstance()
- public static getState()
- public static boolean setState()
- public static void resetState()
- public abstract integer index()
- public abstract boolean remove()
- public abstract boolean optimize()
- protected static string getSignature()
- protected integer tokenizeToDB()
- protected abstract integer addTokensToDB()
- protected abstract boolean toggleTables()
Hierarchy
Extends
Constants
Name | Value |
---|---|
TITLE_CONTEXT | 1 |
TEXT_CONTEXT | 2 |
META_CONTEXT | 3 |
PATH_CONTEXT | 4 |
MISC_CONTEXT | 5 |
Members
Methods
protected
- addTokensToDB() — Method to add a set of tokens to the database.
- toggleTables() — Method to switch the token tables from Memory tables to MyISAM tables when they are close to running out of memory.
public
- index() — Method to index a content item.
- optimize() — Method to optimize the index. We use this method to remove unused terms and any other optimizations that might be necessary.
- remove() — Method to remove a link from the index.
Inherited from FinderIndexer
protected
- addTokensToDB() — Method to add a set of tokens to the database.
- getSignature() — Method to get a content item's signature.
- toggleTables() — Method to switch the token tables from Memory tables to MyISAM tables when they are close to running out of memory.
- tokenizeToDB() — Method to parse input, tokenize it, and then add it to the database.
public
- getInstance() — Returns a reference to the FinderIndexer object.
- getState() — Method to get the indexer state.
- index() — Method to index a content item.
- optimize() — Method to optimize the index. We use this method to remove unused terms and any other optimizations that might be necessary.
- remove() — Method to remove a link from the index.
- resetState() — Method to reset the indexer state.
- setState() — Method to set the indexer state.