Skip to content

Instantly share code, notes, and snippets.

@selcukusta
Created June 30, 2017 13:43
Show Gist options
  • Select an option

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

Select an option

Save selcukusta/2e5646c3d568f646f92674500df74999 to your computer and use it in GitHub Desktop.
curl -X PUT \
http://localhost:9200/suggest_sample_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"
],
"char_filter": [
"html_strip"
],
"tokenizer": "standard"
}
}
}
},
"mappings": {
"sample_type": {
"properties": {
"title": {
"type": "text",
"analyzer": "default"
},
"title_autocomplete": {
"type": "completion",
"analyzer": "default"
}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment