function SearchTextProcessor::process

Same name in other branches
  1. 10 core/modules/search/src/SearchTextProcessor.php \Drupal\search\SearchTextProcessor::process()
  2. 11.x core/modules/search/src/SearchTextProcessor.php \Drupal\search\SearchTextProcessor::process()

Overrides SearchTextProcessorInterface::process

File

core/modules/search/src/SearchTextProcessor.php, line 56

Class

SearchTextProcessor
Processes search text for indexing.

Namespace

Drupal\search

Code

public function process(string $text, ?string $langcode = NULL) : array {
    $text = $this->analyze($text, $langcode);
    return explode(' ', $text);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.