Elasticsearch asciifolding not working properly -
i've created test index using marvel plugin:
post /test { "index" : { "analysis" : { "analyzer" : { "folding": { "tokenizer": "standard", "filter": [ "lowercase", "asciifolding" ] } } } } }
and i'm making analyze request this:
get /test/_analyze?analyzer=folding&text=olá
and i'm getting result:
{ "tokens": [ { "token": "ol", "start_offset": 0, "end_offset": 2, "type": "<alphanum>", "position": 1 } ] }
but need have "ola" token instead of "ol" only. according documentation it's configured:
https://www.elastic.co/guide/en/elasticsearch/guide/current/asciifolding-token-filter.html
what doing wrong?
try this, prove elasticsearch job in end. suspect sense interface not passing correct text analyzer.
put /my_index { "settings": { "analysis": { "analyzer": { "folding": { "tokenizer": "standard", "filter": [ "lowercase", "asciifolding" ] } } } }, "mappings": { "test": { "properties": { "text": { "type": "string", "analyzer": "folding" } } } } } post /my_index/test/1 { "text": "olá" } /my_index/test/_search { "fielddata_fields": ["text"] }
the result:
"hits": { "total": 1, "max_score": 1, "hits": [ { "_index": "my_indexxx", "_type": "test", "_id": "1", "_score": 1, "_source": { "text": "olá" }, "fields": { "text": [ "ola" ] } } ] }
Comments
Post a Comment