Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ES Mapping
{
"mappings":{
"post":{
"properties":{
"body":{
"fields":{
"body":{
"type":"string",
"analyzer":"analyzer_term"
},
"partial_shingle":{
"search_analyzer":"analyzer_term",
"index_analyzer":"analyzer_partial_shingle",
"type":"string"
}
},
"type":"multi_field"
}
}
}
},
"settings":{
"analysis":{
"filter":{
"filter_partial_shingle":{
"type":"shingle",
"max_shingle_size":5,
"min_shingle_size":2,
"output_unigrams" : "false"
}
},
"analyzer":{
"analyzer_term":{
"filter":[
"lowercase",
"asciifolding"
],
"type":"custom",
"tokenizer":"whitespace"
},
"analyzer_partial_shingle":{
"filter":[
"lowercase",
"asciifolding",
"filter_partial_shingle"
],
"type":"custom",
"tokenizer":"whitespace"
}
}
}
}
}
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.