We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi!
Is it possible to retrieve a collection of models with all of the database info, as opposed to just the documents returned by ElasticSearch?
If not, maybe we could add a hydrate method to the results collection?
hydrate
The text was updated successfully, but these errors were encountered:
Here's an example of manual hydration from search results (with some extra code because of #47):
$books = Book::findMany( (new Collection(Book::search('moby dick')))->pluck('id')->toArray() );
If #47 was resolved, the code would be a bit cleaner:
$books = Book::findMany( Book::search('moby dick')->pluck('id')->toArray() );
If we implemented some sort of hydration method, we could probably just do
$books = Book::search('moby dick')->hydrate(); // or $books = Book::search('moby dick', $hydrate = true);
Sorry, something went wrong.
Done.
No branches or pull requests
Hi!
Is it possible to retrieve a collection of models with all of the database info, as opposed to just the documents returned by ElasticSearch?
If not, maybe we could add a
hydrate
method to the results collection?The text was updated successfully, but these errors were encountered: