'"minim am veniam es" OR "sit dolore"' =>
[],
'"am minim veniam es" -eu' =>
[6
],
'"am minim veniam" -"cillum dolore"' =>
[5, 6
],
'"am minim veniam" -"dolore cillum"' =>
[5, 6, 7
],
'xxxxx "minim am veniam es" OR dolore' =>
[],
'xx "minim am veniam es" OR dolore' =>
[],
];
$connection = Database::
getConnection();
foreach ($queries as $query =>
$results) { $result =
$connection->
select('search_index', 'i'
) ->
extend(SearchQuery::
class) ->
searchExpression($query,
static::SEARCH_TYPE
) ->
execute();
$set =
$result ?
$result->
fetchAll() :
[];
$this->
_testQueryMatching($query,
$set,
$results);
$this->
_testQueryScores($query,
$set,
$results);
} // These queries are run against the second index type, SEARCH_TYPE_2.
$queries =
[ // Simple AND queries.
'ipsum' =>
[],