Here is the main problem: https://github.com/doctrine/search/blob/master/lib/Doctrine/Search/Query.php#L257
Here is two ways.
First one: We can create abstract layer for ResultSet, for example Adapter, and wrap all result sets.
Second one: We can move query on client level, create QueryInterface and realize it in ElasticSerach namespace for example, and create method in Client, something like Client::createQuery.
So each query will work only with his native ResultSet.
@MrHash What do you think?
Here is the main problem: https://github.com/doctrine/search/blob/master/lib/Doctrine/Search/Query.php#L257 Here is two ways. First one: We can create abstract layer for ResultSet, for example Adapter, and wrap all result sets. Second one: We can move query on client level, create QueryInterface and realize it in ElasticSerach namespace for example, and create method in Client, something like Client::createQuery. So each query will work only with his native ResultSet. @MrHash What do you think?