I am in the process of building a new site that will have some content in the form of videos and PDFs. To make those more searchable I added the metatag module. We are also using the Search API to hook into Solr and do our search operations.
I have found the hooks I need to insert, update, and delete metatag info from the metatag fields. That part is fairly straight forward.
However, I am stuck on the part where I tell the Search API about the fields so that they can be indexed. I think I will be able to figure out how to push the data to the index with the hooks. I just don't know how to tell the Search API that the fields are there and that they contain strings.
I was looking, originally, at the hook_search_api_item_type_info(). However, after reading the description in the API documentation (in the code) I realize that it is only for new entity types. These metatag fields are mainly attached to nodes. And the documentation specifically says that it should not be used for existing entity types (i.e. nodes) because this hook simply tells about the data controller classes.
Should I use hook_search_api_alter_callback_info() to do this? That seems like a good candidate, but I am just not quite following how this works in the SearchAPI.
How do I tell the Search API that the metatag fields exist and I want to be able to index them?
This is in Drupal 7.