Meilisearch: Error with forked repo without changes.

Created on 3 May 2020  Â·  5Comments  Â·  Source: meilisearch/MeiliSearch

Hi,
these last days I has been working with meilisearch to index information and links from Internet... It works perfectly when I run the docker (compiled) image but I can not use a forked version (no modified) from this repo... I only forked it a few days ago and I ran cargo run --release. But when I execute the index command:

⇒  curl -i -X POST 'http://127.0.0.1:7700/indexes' --data '{ "name": "Movies", "uid": "movies" }'
HTTP/1.1 400 Bad Request
content-length: 0
date: Sun, 03 May 2020 14:31:31 GMT

It doesn t work... it is curious, it is the same command that it works with the docker image... I have tired different things: remove caches, rebuilding, remove data.ms, run from docker or cargo... but same result... I will appreciate any help, the only reply that I receive from meilisearch:

[2020-05-03T14:31:31Z INFO actix_web::middleware::logger] 127.0.0.1:50760 "POST /indexes HTTP/1.1" 400 0 "-" "curl/7.58.0" 0.000170

All 5 comments

Hey @carlosb1,

It seems like it is related to our switch to the actix web framework, we will look into this with @qdequele next week. I advise you to use the commit of a release (i.e. v0.10.1).

Thank you for the report!

Hello @carlosb1. Don't forget to add the Header to say that you're sending json body.
curl -i -X POST 'http://127.0.0.1:7700/indexes' -H "Content-Type: application/json" --data '{ "name": "Movies", "uid": "movies" }'

Thanks! it works with the v0.10.1 I will use it temporally. also thanks for the fast feedback

@carlosb1 Did you try the quentin's response? Does it work?

@Kerollmops I didn t need to include -H in the curl command... Directly, I changed branch... I can try to use master and the json flag if I have a gap.
Another point.. take care because it is not specified the header parameter in the README.md. (If you need for some MR, not problem)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andersju picture andersju  Â·  3Comments

ayalon picture ayalon  Â·  3Comments

frank-io picture frank-io  Â·  3Comments

qdequele picture qdequele  Â·  4Comments

trevyn picture trevyn  Â·  4Comments