Skip to content

Instantly share code, notes, and snippets.

@ncb000gt
Created March 10, 2011 15:40
Show Gist options
  • Save ncb000gt/864293 to your computer and use it in GitHub Desktop.
Save ncb000gt/864293 to your computer and use it in GitHub Desktop.
Elastic search configuration with a custom analyzer.
{
settings: {
number_of_shards: 5,
number_of_replicas: 1,
"index" : {
"analysis" : {
"analyzer" : {
"html" : {
filter: [ 'standard', 'lowercase', 'stop', 'asciifolding' ],
"tokenizer" : "standard",
"char_filter" : ["html_strip"]
}
}
}
}
},
mappings: {
type1: {
properties: {
body: {
type: 'string', //needed to add this.
analyzer: 'html'
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment