19c19 < index ec0ac15..20b01f0 100644 --- > index ec0ac15..a6a0928 100644 22c22 < @@ -357,7 +357,7 @@ protected function indexNode(NodeInterface $node) { --- > @@ -357,19 +357,27 @@ protected function indexNode(NodeInterface $node) { 26a27 > - search_index($node->id(), $this->getPluginId(), $text, $language->getId()); 28c29 < search_index($node->id(), $this->getPluginId(), $text, $language->getId()); --- > + search_index($this->getPluginId(), $node->id(), $language->getId(), $text); 31c32 < @@ -365,11 +365,19 @@ protected function indexNode(NodeInterface $node) { --- > 57c58 < index 91afbc1..12e61e6 100644 --- > index 1ebe99d..f271903 100644 128a130,154 > @@ -372,19 +368,19 @@ function search_invoke_preprocess(&$text, $langcode = NULL) { > /** > * Updates the full-text search index for a particular item. > * > - * @param $sid > - * An ID number identifying this particular item (e.g., node ID). > * @param $type > * The plugin ID or other machine-readable type of this item, > * which should be less than 64 bytes. > - * @param $text > - * The content of this item. Must be a piece of HTML or plain text. > + * @param $sid > + * An ID number identifying this particular item (e.g., node ID). > * @param $langcode > * Language code for text being indexed. > + * @param $text > + * The content of this item. Must be a piece of HTML or plain text. > * > * @ingroup search > */ > -function search_index($sid, $type, $text, $langcode) { > +function search_index($type, $sid, $langcode, $text) { > $minimum_word_size = \Drupal::config('search.settings')->get('index.minimum_word_size'); > > // Multipliers for scores of words inside certain HTML tags. The weights are 160c186 < + * @param strong $langcode --- > + * @param string $langcode 298c324 < index 93b87ef..8caef21 100644 --- > index 93b87ef..c17bb62 100644 364a391,416 > diff --git a/core/modules/search/src/Tests/SearchMatchTest.php b/core/modules/search/src/Tests/SearchMatchTest.php > index 929f355..5243b52 100644 > --- a/core/modules/search/src/Tests/SearchMatchTest.php > +++ b/core/modules/search/src/Tests/SearchMatchTest.php > @@ -36,10 +36,10 @@ function _setup() { > \Drupal::config('search.settings')->set('index.minimum_word_size', 3)->save(); > > for ($i = 1; $i <= 7; ++$i) { > - search_index($i, SEARCH_TYPE, $this->getText($i), LanguageInterface::LANGCODE_NOT_SPECIFIED); > + search_index(SEARCH_TYPE, $i, LanguageInterface::LANGCODE_NOT_SPECIFIED, $this->getText($i)); > } > for ($i = 1; $i <= 5; ++$i) { > - search_index($i + 7, SEARCH_TYPE_2, $this->getText2($i), LanguageInterface::LANGCODE_NOT_SPECIFIED); > + search_index(SEARCH_TYPE_2, $i + 7, LanguageInterface::LANGCODE_NOT_SPECIFIED, $this->getText2($i)); > } > // No getText builder function for Japanese text; just a simple array. > foreach (array( > @@ -47,7 +47,7 @@ function _setup() { > 14 => 'ドルーパルが大好きよ!', > 15 => 'コーヒーとケーキ', > ) as $i => $jpn) { > - search_index($i, SEARCH_TYPE_JPN, $jpn, LanguageInterface::LANGCODE_NOT_SPECIFIED); > + search_index(SEARCH_TYPE_JPN, $i, LanguageInterface::LANGCODE_NOT_SPECIFIED, $jpn); > } > search_update_totals(); > } 366c418 < index 832200e..49bacc4 100644 --- > index 832200e..f08e50e 100644 426c478 < + search_index($this->searchable_nodes[0]->id(), 'foo', 'some text', 'en'); --- > + search_index('foo', $this->searchable_nodes[0]->id(), 'en', 'some text');