You are here

public function SearchApiMultiQuery::parseModes in Search API Multi-Index Searches 7

Retrieve a list of all parse modes supported by this query class.

Return value

array An associative array of parse modes recognized by objects of this class. The keys are the parse modes' ids, values are associative arrays containing the following entries:

  • name: The translated name of the parse mode.
  • description: (optional) A translated text describing the parse mode.

Overrides SearchApiMultiQueryInterface::parseModes

1 call to SearchApiMultiQuery::parseModes()
SearchApiMultiQuery::__construct in ./search_api_multi.query.inc
Constructs a new query object.

File

./search_api_multi.query.inc, line 438

Class

SearchApiMultiQuery
Standard implementation of SearchApiMultiQueryInterface.

Code

public function parseModes() {
  $modes['direct'] = array(
    'name' => t('Direct query'),
    'description' => t("Don't parse the query, just hand it to the search server unaltered. " . "Might fail if the query contains syntax errors in regard to the specific server's query syntax."),
  );
  $modes['single'] = array(
    'name' => t('Single term'),
    'description' => t('The query is interpreted as a single keyword, maybe containing spaces or special characters.'),
  );
  $modes['terms'] = array(
    'name' => t('Multiple terms'),
    'description' => t('The query is interpreted as multiple keywords seperated by spaces. ' . 'Keywords containing spaces may be "quoted". Quoted keywords must still be seperated by spaces.'),
  );
  return $modes;
}