How to define Views filters and relationships for custom Civicrm contact fields that are indexed via Search API? I followed the steps on skvare to index CiviCRM contacts via Search API, then to have Views list the contacts with the search box as an exposed filter.

I need to expose a filter that filters results based on what membership type the contact has. That might require a relationship, which is currently not an option in Views for me, so I might have to write a custom relationship handler as well as the custom filter handler. I have been trying to find the code to read to use as a guide but I have been unable to figure out whether these handlers are being defined in CiviCRM, Views, Search API, or the Civicrm Entity module which I'm also using.

How do you define a custom relationship and filter handlers for custom fields on CiviCRM contacts being displayed via Search API, CiviCRM Entity, and Views?
If this is about getting Membership fields showing in the ADD RELATED FIELDS selector at the bottom of admin/config/search/search_api/index//fields then I expect this is a civicrm entity issue in which case you could check at this chat channel

Otherwise you may be looking for sites/all/modules/civicrm/drupal/modules/views