Skip to content

Instantly share code, notes, and snippets.

/gist:851600
Created Mar 2, 2011

Embed
What would you like to do?
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
You can’t perform that action at this time.