Skip to content

Instantly share code, notes, and snippets.

@lega911
Created August 11, 2014 17:33
Show Gist options
  • Save lega911/e402b4fe9b9914d9e3ab to your computer and use it in GitHub Desktop.
Save lega911/e402b4fe9b9914d9e3ab to your computer and use it in GitHub Desktop.
curl -X PUT 10.0.3.16:9200/btest -d '
{
"settings" : {
"index" : {
"analysis" : {
"analyzer" : {
"my_analyzer" : {
"type" : "custom",
"tokenizer" : "lowercase",
"filter" : ["my_ngram"]
}
},
"filter" : {
"my_ngram" : {
"type" : "edgeNGram",
"min_gram" : 2,
"max_gram" : 50
}
}
}
}
},
"mappings": {
"name": {
"properties": {
"name": {
"type": "string",
"analyzer": "my_analyzer"
}
}
}
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment