Open seivad opened 4 years ago
Sorry I've just noticed that I return just ->raw()
I get the algolia model which is what I am after and not the entire object from the database. I might have to stick with that for the time being instead of mapping over each result type in the aggregator and slimming the response down.
It seems like the Aggregator returns the full model even though at Algolia's end, the indices look correct.
For example at Algolias end within an aggregated indices:
but what gets returned when searching in my Laravel app is:
my Aggregator for global search looks like:
and all of the models are returning the full results but for instance the QuoteItem Model has this:
Which is what I expect to come back. I've commented out transform, no difference. My search controller looks like this:
I have no idea why it looks correct on Algolia's store but the results coming back at the full model. Obviously I want the payload to be as small as possible, so there is no need for timestamps and unnecessary fields etc... Hopefully someone can shed some light on why this is happening and how to resolve to just the results at Algolia's end.