SearchQuery::prepareAndNormalize

public SearchQuery::prepareAndNormalize() Prepares the query and calculates the normalization factor. After the query is normalized the keywords are weighted to give the results a relevancy score. The query is ready for execution after this. Error and warning conditions can apply. Call getStatus() after calling this method to retrieve them. Return value bool TRUE if at least one keyword matched the search index; FALSE if not. File core/modules/search/src/SearchQuery.php, line 391 Class Sea

SearchQuery::searchExpression

public SearchQuery::searchExpression($expression, $type) Sets the search query expression. Parameters string $expression: A search string, which can contain keywords and options. string $type: The search type. This maps to {search_index}.type in the database. Return value $this File core/modules/search/src/SearchQuery.php, line 200 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code public function searchExpression($expression, $type) { $this-

SearchQuery::getStatus

public SearchQuery::getStatus() Returns the query status bitmap. Return value int A bitmap indicating query status. Zero indicates there were no problems. A non-zero value is a combination of one or more of the following flags: SearchQuery::NO_POSITIVE_KEYWORDS SearchQuery::EXPRESSIONS_IGNORED SearchQuery::LOWER_CASE_OR SearchQuery::NO_KEYWORD_MATCHES File core/modules/search/src/SearchQuery.php, line 644 Class SearchQuery Search query extender and helper functions. Namespace Dru

SearchQuery::parseSearchExpression

protected SearchQuery::parseSearchExpression() Parses the search query into SQL conditions. Sets up the following variables: $this->keys $this->words $this->conditions $this->simple $this->matches File core/modules/search/src/SearchQuery.php, line 224 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code protected function parseSearchExpression() { // Matches words optionally prefixed by a - sign. A word in this case is // some

SearchQuery::parseWord

protected SearchQuery::parseWord($word) Parses a word or phrase for parseQuery(). Splits a phrase into words. Adds its words to $this->words, if it is not already there. Returns a list containing the number of new words found, and the total number of words in the phrase. File core/modules/search/src/SearchQuery.php, line 358 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code protected function parseWord($word) { $num_new_scores = 0; $num_v

SearchQuery::NO_POSITIVE_KEYWORDS

Indicates no positive keywords were in the search expression. Positive keywords are words that are searched for, as opposed to negative keywords, which are words that are excluded. To count as a keyword, a word must be at least \Drupal::config('search.settings')->get('index.minimum_word_size') characters. See also SearchQuery::getStatus() File core/modules/search/src/SearchQuery.php, line 45 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code

SearchQuery::NO_KEYWORD_MATCHES

Indicates that no positive keyword matches were found. See also SearchQuery::getStatus() File core/modules/search/src/SearchQuery.php, line 75 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code const NO_KEYWORD_MATCHES = 8;

SearchQuery::LOWER_CASE_OR

Indicates that lower-case "or" was in the search expression. The word "or" in lower case was found in the search expression. This probably means someone was trying to do an OR search but used lower-case instead of upper-case. See also SearchQuery::getStatus() File core/modules/search/src/SearchQuery.php, line 68 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code const LOWER_CASE_OR = 4;

SearchQuery::addScore

public SearchQuery::addScore($score, $arguments = array(), $multiply = FALSE) Adds a custom score expression to the search query. Score expressions are used to order search results. If no calls to addScore() have taken place, a default keyword relevance score will be used. However, if at least one call to addScore() has taken place, the keyword relevance score is not automatically added. Note that you must use this method to add ordering to your searches, and not call orderBy() directly, when u

SearchQuery::execute

public SearchQuery::execute() Executes the search. The complex conditions are applied to the query including score expressions and ordering. Error and warning conditions can apply. Call getStatus() after calling this method to retrieve them. Return value \Drupal\Core\Database\StatementInterface|null A query result set containing the results of the query. Overrides SelectExtender::execute File core/modules/search/src/SearchQuery.php, line 547 Class SearchQuery Search query extender and hel