You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you very much for your job.
Your package is very interesting and functional.
The ability to store data on different models similar in structure in one index due to the "__class_name" attribute is very useful. At the same time, this function changes the standard functionality of the scout package and will not be able to work with an already created database.
Is your feature request related to a problem? Please describe.
When testing different packages for scout + elastic without any callback and additional functions of the package, I expected to get the same search results
Describe the solution you'd like
Search result will contain models instance of target search model (not imported model).
Describe alternatives you've considered
In first i try use custom binding for HitsIteratorAggregate
But this is not a very good solution, because it is necessary to specify the model class each time and you cannot make requests to the search engine until the previous request is completed.
Perhaps this method will be more useful and will not break compatibility.
On importing model to storage, __class_name has class name of imported model.
On searching we retrieve models by same class stored in __class_name.
Its nice for a project without any additional services (other language, other model name).
Search result will be losted when we rename model class, move model to other namespace, use several models for frontend and backend, fill elastic database with other service or try to use already existed data.
Eloquent will save to database 'ProductAlias' instead App\Models\Product. For retrieve assigned class for alias used Model::getActualClassNameForMorph('ProductAlias') => 'App\Models\Product'
This approach is more flexible to the organization of the code and allows you to reassign the class at any time.
This solution is not quick.
Thank you very much for your job.
Your package is very interesting and functional.
The ability to store data on different models similar in structure in one index due to the "__class_name" attribute is very useful. At the same time, this function changes the standard functionality of the scout package and will not be able to work with an already created database.
Is your feature request related to a problem? Please describe.
When testing different packages for scout + elastic without any callback and additional functions of the package, I expected to get the same search results
Describe the solution you'd like
Search result will contain models instance of target search model (not imported model).
Describe alternatives you've considered
In first i try use custom binding for HitsIteratorAggregate
But this is not a very good solution, because it is necessary to specify the model class each time and you cannot make requests to the search engine until the previous request is completed.
Perhaps this method will be more useful and will not break compatibility.
The text was updated successfully, but these errors were encountered: