meilisearch

12/04/2023
# json de données :
# https://docs.meilisearch.com/movies.json

[
{"id":2,"title":"Ariel","overview":"Taisto Kasurinen is a Finnish coal miner whose father has just committed suicide and who is framed for a crime he did not commit. In jail, he starts to dream about leaving the country and starting a new life. He escapes from prison but things don't go as planned...","genres":["Drama","Crime","Comedy"],"poster":"https://image.tmdb.org/t/p/w500/ojDg0PGvs6R9xYFodRct2kdI6wC.jpg","release_date":593395200},
{"id":5,"title":"Four Rooms","overview":"It's Ted the Bellhop's first night on the job...and the hotel's very unusual guests are about to place him in some outrageous predicaments. It seems that this evening's room service is serving up one unbelievable happening after another.","genres":["Crime","Comedy"],"poster":"https://image.tmdb.org/t/p/w500/75aHn1NOYXh4M7L5shoeQ6NGykP.jpg","release_date":818467200},
]

# insérer les datas dans la bdd
curl -H 'Authorization: Bearer abcdef' -X POST 'https://meilisearch.raphaelpiccolo.com/indexes/movies/documents?primaryKey=id'   -H 'Content-Type: application/json'   --data-binary @movies.json

# voir la progression de l'insertion
curl -H 'Authorization: Bearer abcdef'  -X GET 'https://meilisearch.raphaelpiccolo.com/tasks/0'

# faire une recherche
curl \
  -H 'Authorization: Bearer abcdef'  -X GET 'https://meilisearch.raphaelpiccolo.com/indexes/movies/search' \
  -H 'Content-Type: application/json' \
  --data-binary '{ "q": "botman" }'

Raccourcis