Project to show meilisearch in action (products dataset)
This repo uses parcel to build a simple frontend using vanilla js + instantsearch
- Run meilisearch
docker run -d -it --rm -p 7700:7700 -v $(pwd)/meili_data:/meili_data getmeili/meilisearch:v1.1
- Index data
curl -X POST 'http://localhost:7700/indexes/products/documents?primaryKey=sku' -H 'Content-Type: application/json' --data-binary @dataset/products.json
- Configure filterable / sortable fields (to facet and use in filters)
curl \
-X PATCH 'http://localhost:7700/indexes/products/settings' \
-H 'Content-Type: application/json' \
--data-binary '{
"filterableAttributes": [
"type",
"category.name",
"manufacturer",
"price"
],
"sortableAttributes": [
"type",
"category.name",
"manufacturer",
"price"
]
}'
- Start project
$ npm install && npm run start