The Multi-Index Searches module, as it currently is, is not very useful, as nearly all contrib extensions have to be re-implemented for it, due to it using a completely separate search system. It might have been the best way to be implemented back when it was written, but I think we should be able to do better in D8, and should do so.
Why is this issue in the Search API project? Because I want to keep the use case of the Multi-Index Searches module in my mind while making decisions about API changes in D8, so we can implement this as cleanly and usefully as possible.
My currently favored idea would be to move away from doing this at query time, but rather to allow indexes to have several different item types. By defining a data source controller doing that, this would already be possible, and withit would get a lot easier. Does this sound reasonable to you? I admit, having to create a new index to be able to do multi-type searches is a bit more work than before – but on the other hand, if we do it properly, this would be the only search index you'd need on the site, because you could filter for the different item types in the type-specific searches.
Now, what would be missing for that idea? I think the largest drawback currently, when implementing it like this, would be that all entity-specific extensions wouldn't work, as
getEntityType() can only return a single type. But I wouldn't really know how to handle multiple entity types returned from that (or a similar) method – usually we need to know a single one. Maybe building the multi-type support deeper into the API and having an always-present
search_api_type field on all items, that maybe would even have to be returned from searches, would be the solution. But that would be a rather large change, and I'd be reluctant to do that unless I know it's necessary and useful enough.
The other thing is related to that, with processors like Node Access not working for Multi queries. With the required type field this would be solved, but the question is whether there are also other ways to do that.
So, any feedback on this? Anything to add? Does maybe someone have some other vision/idea for how to overhaul the Multi module for D8?