icu analysis/stopwords issue
result=`curl -s -XDELETE 'http://localhost:9200/test?pretty=true'` | |
echo "$result" | |
echo "attempting index creation" | |
result=`curl -s -XPOST 'http://localhost:9200/test?pretty=true' -d '{ | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"_fr" : { | |
"type": "custom", | |
"tokenizer": "icu_tokenizer", | |
"filter": ["icu_folding", "icu_normalizer", "fr_stop_filter", "fr_stem_filter"] | |
}, | |
"_fr2" : { | |
"type": "custom", | |
"tokenizer": "icu_tokenizer", | |
"filter": ["icu_normalizer", "fr_stop_filter", "fr_stem_filter"] | |
}, | |
"default": { | |
"type": "custom", | |
"tokenizer": "icu_tokenizer", | |
"filter": ["icu_folding", "icu_normalizer"] | |
} | |
}, | |
"filter" : { | |
"fr_stop_filter": { | |
"type": "stop", | |
"stopwords": ["_french_"] | |
}, | |
"fr_stem_filter": { | |
"type": "stemmer", | |
"name": "light_french" | |
} | |
} | |
} | |
} | |
}'` | |
echo $result | |
result=`curl -s "http://localhost:9200/_analyze?analyzer=french&pretty=true&text=M%C3%AAme"` | |
echo 'french analyzer: ' $result | |
result=`curl -s "http://localhost:9200/test/_analyze?analyzer=_fr&pretty=true&text=M%C3%AAme"` | |
echo 'folding/normalizing analyzer' $result | |
result=`curl -s "http://localhost:9200/test/_analyze?analyzer=_fr2&pretty=true&text=M%C3%AAme"` | |
echo 'normalizing analyzer' $result | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment