Closed fla closed 3 years ago
Hello @fla
I don't succeed to reproduce the issue you mention on Postman
?primaryKey=id
-> the index is created at the same time the documents are pushed and the primary key id
is set.?primaryKey=id
-> according to what you say, it should raise a A primary key is already present. It's impossible to update it
error. But it did not for me.What is the version of MeiliSearch you are using? We had this issue on a MeiliSearch release candidate (RC) of the v0.19.0 but we fix it and this behavior does not exist in the v0.19.0.
If you use docker can you launch those commands to launch MeiliSearch:
docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey
if you don't use docker, can you download it this way:
curl -L https://install.meilisearch.com | sh
./meilisearch
If it does not fix anything and you are already using the v0.19.0 of MeiliSearch can you exactly detail the steps you've done with Postan/Insomnia on the MeiliSearch repository? Because this would be a MeiliSearch issue and not an issue related to the laraval-scout plugin.
You are right, it works with docker so I think the problem is on my setup. I am using windows10 so I had to build it from source (v0.19.0 not RC). This might be the issue but I can't think of any reason, I'll just use docker for now.
Thank you for helping me figure this out.
New instalation of the latest version of Laravel 8, with one some users in the database.
When running this command:
php artisan scout:import "App\Models\User"
The response is:
Seems like this scout driver is making the post request to
127.0.0.1:63076 "POST /indexes/users/documents?primaryKey=id HTTP/1.1" 400 232 "-" "GuzzleHttp/7" 0.000152
and because the post contains the query paramprimaryKey=id
the import fails.This seems to be an issue with the meilisearch documentation as it clearly states on this page
However when I test the post with Insomnia/Postman the same error happens if I add
?primaryKey=id
so the documentation is wrong or meilisearch doesn't handle properly the primaryKey properly (shouldn't raise an error if the primaryKey is the same with the one already defined on the index). I'll probably open an issue on the meilisearch documentation repo too but this issue needs to be fixed in this scout driver too.I've been trying to set up this scout driver in my project for the last 2 days and seems like there are a couple of more issues and I started to question myself, is meilisearch production ready? They seem to change a lot of things and leave documentation behind with the updates. Does anyone else use it in production for let's say 1M small documents?