diff -u b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php --- b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php @@ -139,4 +139,21 @@ $this->assertEqual(count($search_result), 1, 'The search found only one result'); $this->assertEqual($search_result[0]['title'], 'Third node this is the Hungarian title', 'The search finds the correct Hungarian title.'); + + // Test for search with common key word across multiple languages + $plugin->setSearch('node', array(), array()); + $search_result = $plugin->execute(); + + $this->assertEqual(count($search_result), 6, 'The search found total six results'); + + // Test with language filters and common key word + $plugin->setSearch('node', array('f' => array('language:hu')), array()); + $search_result = $plugin->execute(); + + $this->assertEqual(count($search_result), 2, 'The search found 2 results'); + + // Test to check for the language of result items. + foreach($search_result as $result) { + $this->assertEqual($result['langcode'], 'hu', 'The search found the correct Hungarian result'); + } } }