Created
July 13, 2011 10:14
-
-
Save ianAndrewClark/1080038 to your computer and use it in GitHub Desktop.
results in MapperParsingException[Analyzer [techTermPreservingFilterAnalyzer] not found for field [jobtitle]]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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