Search not finding search term from page title Using the default database search index in drupal 8, when I search for a term from the a page title, sometimes it shows the result and sometimes it shows nothing, even though i enter the exact page title in the search. All pages have been indexed.

How can I debug why the search term is not being returned?
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-&gt;view($node, 'search_index', $language-&gt;getId());
  ...
  // Add the title to text so it is searchable.
  $build['search_title'] = [
    '#prefix' =&gt; '&lt;h1&gt;',
    '#plain_text' =&gt; $node-&gt;label(),
    '#suffix' =&gt; '&lt;/h1&gt;',
    '#weight' =&gt; -1000
  ];
  $text = $this-&gt;renderer-&gt;renderPlain($build);