Skip to content

Instantly share code, notes, and snippets.

@selcukusta
Created December 30, 2017 23:03
Show Gist options
  • Select an option

  • Save selcukusta/2e712ce1aabc0762e2c8c61327a8175b to your computer and use it in GitHub Desktop.

Select an option

Save selcukusta/2e712ce1aabc0762e2c8c61327a8175b to your computer and use it in GitHub Desktop.
curl -X PUT \
http://localhost:9200/shopping_index \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"default": {
"filter": [
"lowercase",
"asciifolding",
"word_delimiter"
],
"tokenizer": "standard"
}
}
}
},
"mappings": {
"product": {
"properties": {
"ProductName": {
"type": "text"
},
"CategoryId": {
"type": "integer"
},
"Price": {
"type": "double"
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment