Q: Can I combine two (geofield) field instances from different relationships into one aggregated Search API field?
So far I tried search_api_combined, which seems ok, but does only support the default field types, but not geofield LatLong for proximity search.
I was thinking that I could somehow craft a custom relationship that, for a given (product) node fetches one of the two profiles, or one of the two field instance values.
I guess all I need to know really is where the relationships in Search API are coming from.
Use case details:
- Two profile2 profile types: Private person, merchant. Usually one person has only one such profile. In case of doubt, I would pick one and ignore the other.
- Both contain a field instance of "field_coordinates" geofield.
- Both contain a postal address field that acts as a geocoding source for the geofield, but with different granularity (private person only specifies postal code, merchant specifies full address). (This is one of the reasons why I'm using profile2) (This is not central to the question, just to give a better idea about the problem space.)
- Search API and Facet API.
- Product nodes with authors.
- Profile2 geofield field_coordinates should act as the location for products.
- Search index for products should combine the field_coordinates from different profiles into one aggregated field.