Skip to content

Instantly share code, notes, and snippets.

Created November 15, 2012 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4079257 to your computer and use it in GitHub Desktop.
Save anonymous/4079257 to your computer and use it in GitHub Desktop.
{
"mappings":{
"master":{
"_all" : {"enabled" : true},
"properties":{
"id":{
"type":"string"
},
"name":{
"type":"string",
"search_analyzer": "str_search_analyzer",
"index_analyzer": "str_index_analyzer",
"boost":30.0
}
}
},
"company":{
"_all" : {"enabled" : true},
"_parent": {"type": "master"},
"properties":{
"name":{
"type":"string",
"search_analyzer": "str_search_analyzer",
"index_analyzer": "str_index_analyzer",
"boost":25.0
},
"description":{
"type":"string",
"analyzer":"default",
"boost":5.0
},
"category":{
"type":"string",
"analyzer":"default",
"boost":10.0
}
}
},
"vertical":{
"_all" : {"enabled" : true},
"_parent": {"type": "master"},
"properties":{
"name":{
"type":"string",
"search_analyzer": "str_search_analyzer",
"index_analyzer": "str_index_analyzer",
"boost":25.0
},
"title":{
"type":"string",
"analyzer":"default",
"boost":5.0
},
"description":{
"type":"string",
"analyzer":"default",
"boost":10.0
},
"keywords":{
"type":"string",
"search_analyzer": "str_search_analyzer",
"index_analyzer": "str_index_analyzer",
"boost":15.0
}
}
}
},
"settings":{
"analysis":{
"analyzer":{
"default":{
"type":"custom",
"tokenizer":"myTokenizer",
"filter":["lowercase","asciifolding"],
"char_filter":["html_strip"],
"language": "German"
},
"str_search_analyzer": {
"tokenizer": "keyword",
"filter": ["lowercase","asciifolding"]
},
"str_index_analyzer": {
"tokenizer": "keyword",
"filter": ["lowercase", "substring","asciifolding"],
"char_filter":["html_strip"]
}
},
"tokenizer": {
"myTokenizer": {
"type":"standard",
"max_token_length":1200
}
},
"filter": {
"decompounder_de": {
"type":"dictionary_decompounder",
"word_list_path":"german.dic"
},
"substring" : {
"type" : "nGram",
"min_gram" : 1,
"max_gram" : 20
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment