Skip to content

girorme/meilisearch-ecommerce-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meilisearch-ecommerce-example

Project to show meilisearch in action (products dataset)

Usage

This repo uses parcel to build a simple frontend using vanilla js + instantsearch

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

Images

image

About

Project to show meilisearch in action (products dataset)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published