Scout Database Search Engine #43146
Unanswered
MathiasWeisheit
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
Hi, Im using meilisearch and Database search at the same time to improve my results.
In my toSearchableArray function I add some virtual attributes to collect data from realationships.
So meilisearch searches within. That's fine.
But if I use the Database engine with the same toSearchableArray it will fail, because these colums does not exist at the database.
This is because the function buildSearchQuery of DatabaseEngine.php only uses the keys of the array. array_keys($builder->model->toSearchableArray())
Is it possible that reduce this keys to the shema-columns?
My current workaround:
I added a public varibale extendSearchableArray to the model.
With this variable I control the toSearchableArray function.
Constoller
Model
Beta Was this translation helpful? Give feedback.
All reactions