This is easy to debug, because the search index is built of rendered nodes with the view mode search_index
. So you could build a view displaying all nodes with this view mode and check the result:
Edit:
The node search plugin adds the title to the rendered node, so if the page title is the node label, it should be included in the search index:
NodeSearch::updateIndex():
$build = $node_render->view($node, 'search_index', $language->getId());
...
// Add the title to text so it is searchable.
$build['search_title'] = [
'#prefix' => '<h1>',
'#plain_text' => $node->label(),
'#suffix' => '</h1>',
'#weight' => -1000
];
$text = $this->renderer->renderPlain($build);