Skip to content

Instantly share code, notes, and snippets.

Created March 2, 2011 19:50
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/851600 to your computer and use it in GitHub Desktop.
Save anonymous/851600 to your computer and use it in GitHub Desktop.
curl -XPUT http://localhost:9200/test_index/ -d '
{
"index": {
"analysis": {
"analyzer": {
"index_analyzer": {
"tokenizer": "nGram",
"filter": ["lowercase", "snowball"]
},
"search_analyzer": {
"tokenizer": "nGram",
"filter": ["lowercase", "snowball"]
}
},
"filter": {
"snowball": {
"type": "snowball",
"language": "English"
}
}
}
}
}'
curl -XPUT 'http://localhost:9200/test_index/item/_mapping' -d '
{
"item": {
"properties": {
"title": {
"type": "string",
"boost": 2.0,
"index": "analyzed",
"store": "yes",
"term_vector" : "with_positions_offsets"
},
"description": {
"type": "string",
"boost": 1.0,
"index": "analyzed",
"store": "yes",
"term_vector" : "with_positions_offsets"
},
"link": {
"type": "string"
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment