function search_index_split
Same name in other branches
- 7.x modules/search/search.module \search_index_split()
- 8.9.x core/modules/search/search.module \search_index_split()
Simplifies and splits a string into words for indexing.
Parameters
string $text: Text to process.
string|null $langcode: Language code for the language of $text, if known.
Return value
array Array of words in the simplified, preprocessed text.
Deprecated
in drupal:9.1.0 and is removed from drupal:10.0.0. Use a \Drupal\search\SearchTextProcessorInterface::process() instead.
See also
https://www.drupal.org/node/3078162
1 call to search_index_split()
- SearchDeprecationTest::testDeprecatedIndexSplit in core/
modules/ search/ tests/ src/ Kernel/ SearchDeprecationTest.php
File
-
core/
modules/ search/ search.module, line 226
Code
function search_index_split($text, $langcode = NULL) {
@trigger_error('search_index_split() is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Use \\Drupal\\search\\SearchTextProcessorInterface::process() instead. See https://www.drupal.org/node/3078162', E_USER_DEPRECATED);
return \Drupal::service('search.text_processor')->process($text, $langcode);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.