0

My question is related to the Search API Drupal 8 module. I am modifying my configuration via config file updates. After I am installing my custom module, I can see my config reflected in the search index field settings via the configuration form. However, after I re-index I cannot find content via my newly defined fields. This works only, if I open the search index fields configuration form and submit it manually via webbrowser. No config changes - just hitting the save button.

Tried clearing the cache, entity updates, rebuild tracking information, rebuild the search index - nothing helps.

Can I implement anything into hook_install() from my custom module to propagate the necessary config changes properly to my database?

0

I think I have solved it by myself. I am re-saving the search index by myself via hook_install().

  $index_storage = \Drupal::entityTypeManager()
    ->getStorage('search_api_index');
  $index = $index_storage->load('search_content');
  $index->save();

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.