\FinderIndexerHelper
Helper class for the Finder indexer package.
Synopsis
class FinderIndexerHelper
{
- // members
- public FinderIndexerStemmer $stemmer;
- // methods
- public static string parse()
- public static array tokenize()
- public static string stem()
- public static integer addContentType()
- public static boolean isCommon()
- public static array getCommonWords()
- public static string getDefaultLanguage()
- public static string getPrimaryLanguage()
- public static string getContentPath()
- public static boolean getContentExtras()
- public static string prepareContent()
Members
public
- $stemmer
—
FinderIndexerStemmer
The token stemmer object. The stemmer is set by whatever class wishes to use it but it must be an instance of FinderIndexerStemmer.
Methods
public
- addContentType() — Method to add a content type to the database.
- getCommonWords() — Method to get an array of common terms for a language.
- getContentExtras() — Method to get extra data for a content before being indexed. This is how we add Comments, Tags, Labels, etc. that should be available to Finder.
- getContentPath() — Method to get the path (SEF route) for a content item.
- getDefaultLanguage() — Method to get the default language for the site.
- getPrimaryLanguage() — Method to parse a language/locale key and return a simple language string.
- isCommon() — Method to check if a token is common in a language.
- parse() — Method to parse input into plain text.
- prepareContent() — Method to process content text using the onContentPrepare event trigger.
- stem() — Method to get the base word of a token. This method uses the public {@link FinderIndexerHelper::$stemmer} object if it is set. If no stemmer is set, the original token is returned.
- tokenize() — Method to tokenize a text string.