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
Currently the way Elastiquent works is it uses the indexed source data in your Elasticsearch documents as the population data for your models. The whole idea behind using Elasticsearch is because it's super fast, so this way you are never hitting the database - you are bypassing that and using your indexed data only.
There are limitations to this, obviously - one being that you can only access data you have indexed, so you can't bust out relationships like you would when you are using Eloquent as you normally would. However, you can choose to index certain relationship data in your documents and search on those, allowing you to
So I'm wondering if Elastiquent needs functionality that allows you to hit the full database, using Elasticsearch as basically the search broker. So Elastiquent would search for the term and then do a FIELD query to limit to IDs, allowing you to do whatever you'd like to that query. It's a method that pushes Elasticsearch further back in the process but it may offer an easier path to flexibility for those who need it.
Adam
The text was updated successfully, but these errors were encountered:
Yes this would be very helpful but on an opt-in per query basis.
So, sometimes the index has all the data the request needs, but other times another data store should be able to augment missing data/relations.
On a side note, I really like how https://github.com/jenssegers/laravel-mongodb allows relations between 'moloquent' models and eloquent models... And I was wondering if you are aware of what the Yii 2.0 team is doing to integrate ES in their ActiveRecord system.
Just found this package and that is something I would need to see to use this. My application relies on relationships throughout so returning Eloquent model(s) after searching would be necessary. As pradius-fut said above, make it a per query basis , but also have an option to make it the default.
Hello all - looking for some feedback on this.
Currently the way Elastiquent works is it uses the indexed source data in your Elasticsearch documents as the population data for your models. The whole idea behind using Elasticsearch is because it's super fast, so this way you are never hitting the database - you are bypassing that and using your indexed data only.
There are limitations to this, obviously - one being that you can only access data you have indexed, so you can't bust out relationships like you would when you are using Eloquent as you normally would. However, you can choose to index certain relationship data in your documents and search on those, allowing you to
So I'm wondering if Elastiquent needs functionality that allows you to hit the full database, using Elasticsearch as basically the search broker. So Elastiquent would search for the term and then do a
FIELD
query to limit to IDs, allowing you to do whatever you'd like to that query. It's a method that pushes Elasticsearch further back in the process but it may offer an easier path to flexibility for those who need it.Adam
The text was updated successfully, but these errors were encountered: