$result =
$connection->
select('search_dataset', 'd'
) ->
fields('d',
['reindex'
]) ->
condition('type', 'node_search'
) ->
condition('sid',
$this->searchableNodes
[1
]->
id()) ->
execute() ->
fetchField();
$this->
assertEquals($old,
$result, 'Reindex time was not updated if node was already marked'
);
// Add a bogus entry to the search index table using a different search
// type. This will not appear in the index status, because it is not
// managed by a plugin.
$search_index->
index('foo',
$this->searchableNodes
[0
]->
id(), 'en', 'some text'
);
$this->
assertIndexCounts(1, 8, 'after adding a different index item'
);
// Mark just this "foo" index for reindexing.
$search_index->
markForReindex('foo'
);
$this->
assertIndexCounts(1, 8, 'after reindexing the other search type'
);
// Mark everything for reindexing.
$search_index->
markForReindex();
$this->
assertIndexCounts(8, 8, 'after reindexing everything'
);
// Clear one item from the index, but with wrong language.