Set up a small index of items to test against.
function _setup() {
config('search.settings')
->set('index.minimum_word_size', 3)
->save();
for ($i = 1; $i <= 7; ++$i) {
search_index($i, SEARCH_TYPE, $this
->getText($i), LANGUAGE_NOT_SPECIFIED);
}
for ($i = 1; $i <= 5; ++$i) {
search_index($i + 7, SEARCH_TYPE_2, $this
->getText2($i), LANGUAGE_NOT_SPECIFIED);
}
// No getText builder function for Japanese text; just a simple array.
foreach (array(
13 => '以呂波耳・ほへとち。リヌルヲ。',
14 => 'ドルーパルが大好きよ!',
15 => 'コーヒーとケーキ',
) as $i => $jpn) {
search_index($i, SEARCH_TYPE_JPN, $jpn, LANGUAGE_NOT_SPECIFIED);
}
search_update_totals();
}