Open muratsac opened 2 years ago
It also makes me question why. I really want to use FOS Elastica as a way to expedite slow database queries, and I have all the mapping through related Object IDs, and everything is set up with JMS Serializer, so I don't understand why the project runs FOS Elastica queries + ORM queries too
Then we will get an Array instead of an Object. That's not what should happen.
If the bundle works correctly, then the data is synchronised, so there is no need to run queries. Otherwise, why should we use Elastica instead of Doctrine, if Elasrica runs Doctrine queries? It doesn't make any sense.
The most I can imagine is to offer the Dev to enable Doctrine queries instead of making them by default.
-
( this was a reply for the following message )
$this->finder->find($boolQuery);
after getting the results from elasticsearch, find method transforms and maps with your object class. so if you want to avoid that, I think you can use findRaw method instead.
Search code snippet
Logs
Why is there a doctrine query?