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::preExecute

public SearchQuery::preExecute(SelectInterface $query = NULL) Generic preparation and validation for a SELECT query. Return value TRUE if the validation was successful, FALSE if not. Overrides SelectExtender::preExecute File core/modules/search/src/SearchQuery.php, line 463 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search Code public function preExecute(SelectInterface $query = NULL) { if (!$this->executedPrepare) { $this->prepareAndNor

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::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::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::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::EXPRESSIONS_IGNORED

Indicates that part of the search expression was ignored. To prevent Denial of Service attacks, only \Drupal::config('search.settings')->get('and_or_limit') expressions (positive keywords, phrases, negative keywords) are allowed; this flag indicates that expressions existed past that limit and they were removed. See also SearchQuery::getStatus() File core/modules/search/src/SearchQuery.php, line 57 Class SearchQuery Search query extender and helper functions. Namespace Drupal\search

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