Laravel MongoDB Search Problem #708
Closed
niyazialpay
started this conversation in
Feedback & Feature Proposal
Replies: 2 comments 2 replies
-
Hi @niyazialpay , apologies for the late reply. It sounds like this might be a feature request for the https://github.com/laravel/scout repository? |
Beta Was this translation helpful? Give feedback.
2 replies
-
Laravel Scout works with MongoDB models using the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I use my Laravel project with MongoDB database. The project works correctly without any incompatibility and problems with MongoDB on the Laravel side, but there is a problem with Meilisearch integration. Added or updated content reaches the Meilisearch side. However, Laravel cannot bring the content because the query to the database is made incorrectly in the search process with the model.
use App\Models\Order;
$orders = Order::search('Star Trek')->get();
When I examine this with Laravel debugbar, I see that this query result is executed on the MongoDB side as follows.
order.find({"order._id":{"$in":["656d92be76e5080bcf02c393"]}},{"typeMap":{"root":"array","document":"array"}})
On the MongoDB side, only field should be used in the find query, when the query is queried as order._id, it works as a nested query and no result comes. It would be very good if you can make an update here to query only with field without table name.
Beta Was this translation helpful? Give feedback.
All reactions