Skip to content

Instantly share code, notes, and snippets.

@ianAndrewClark
Created July 13, 2011 10:14
Show Gist options
  • Save ianAndrewClark/1080038 to your computer and use it in GitHub Desktop.
Save ianAndrewClark/1080038 to your computer and use it in GitHub Desktop.
results in MapperParsingException[Analyzer [techTermPreservingFilterAnalyzer] not found for field [jobtitle]]
curl -XPUT 'localhost:9200/jt/' -d '
{
"settings": {
"index": {
"number_of_shards":5,
"number_of_replicas":0
}
}
}
'
curl -XPUT 'localhost:9200/jt/_settings' -d '
{
"analysis": {
"filter": {
"techTermPreservingFilter": {
"protected_words": [
"c++",
".net",
"c#"
],
"type": "word_delimiter"
}
},
"analyzer": {
"techTermPreservingFilterAnalyzer": {
"filter": [
"lowercase",
"techTermPreservingFilter"
],
"type": "custom",
"tokenizer": "whitespace"
}
}
}
}
'
curl -XPUT 'localhost:9200/jt/jobtitles/_mapping' -d '
{
"jobtitles": {
"properties": {
"id": { "type": "long" },
"jobtitle": { "type": "string", "analyzer": "techTermPreservingFilterAnalyzer" }
}
}
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment