How to make a facet search on a taxonomy term contained in a paragraph contained in a content type?
A solution is to associate the taxonomy directly with the content type (field_ingredient_search_index in the example below) and make a hook to update it automatically.
$nodeTerms = []; // 1,2,3 = terms IDs
$erase = [];
$node-&gt;set('field_ingredient_search_index', $erase);
    
foreach ($node-&gt;get('field_liste_ingredients')-&gt;referencedEntities() as $enty){
    
  if($enty-&gt;getParagraphType()-&gt;id == 'ingredient' &amp;&amp; isset($enty-&gt;get('field_ingredient')-&gt;target_id)) {
      $nodeTerms[] = $enty-&gt;get('field_ingredient')-&gt;target_id;
  }
    
}
    
$node-&gt;set('field_ingredient_search_index', $nodeTerms);