I am using ECk module in one of my content for displaying content in managed way . The problem which i am facing the content in eck fields not creating search index when we are searching its content by input any string in search block nothing is searching regarding that field.
I have properly indexed all the node in admin/config/search/pages
Actually when i am enabling search index view mode in any content type then its content is searchable otherwise not. There is no option to add search index view mode in Eck entity type like node content type.
I want to programatically add search index view mode in ECK field.
I want to do something like below code
$entity_type="eck"; //The entity for which you want to create the view mode $view_mode="search index"; //The name of the new view mode $settings=Array(); $settings["id"]=$entity_type.".".$view_mode; $settings["targetEntityType"]=$entity_type; $evm=Drupal\Core\Entity\Entity\EntityViewMode::create($settings); $evm->save();