Search info_split is empty I need to customize the search results of a drupal 8 (8.7.0 currently) page a bit and need the node_type for this. According to search-result.html.twig, this should be stored in info_split.type, but the whole variable is empty.

How can I get the node type inside the search-result.html.twig file?
Alright, so I'm still not sure why the fields are empty, but they the keys are certainly there. Either it is a bug in the core, or some weird behaviour of my installations.

I fixed it now manually by implementing the preprocess_search_result hook in mytheme.theme:

function mytheme_preprocess_search_result(&amp;$variables) {

    $variables['type'] = $variables['result']['node']-&gt;get('type')-&gt;getString();
    $variables['nid'] = $variables['result']['node']-&gt;get('nid')-&gt;getString();

    switch ($variables['type']) {
        // some other adjustments based on the node tpye 
    }
}