Skip to content

Instantly share code, notes, and snippets.

@kimchy
Created October 6, 2011 18:43
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save kimchy/1268256 to your computer and use it in GitHub Desktop.
curl -XPUT 'http://localhost:9200/test/' -d '{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0,
"analysis": {
"analyzer": {
"containsText" : {
"tokenizer": "whitespace",
"filter": ["asciifolding", "lowercase", "autocomplete"]
}
},
"filter": {
"autocomplete": {"type": "edgeNGram", "min_gram": "1",
"max_gram": "100", "side": "front"}
}
}
},
"mappings": {
"program" : {
"properties" : {
"title": {"type" : "string", "store" : "yes",
"index" : "analyzed" , "term_vector" : "with_positions_offsets",
"analyzer" : "containsText"}
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment