I want to use this but I can't understand how to write valid keywords_pattern. I modify code from example like this
{ "settings": { "analysis": { "analyzer": { "protect_cats": { "type": "custom", "tokenizer": "standard", "filter": ["lowercase", "protect_cats", "porter_stem"] }, "normal": { "type": "custom", "tokenizer": "standard", "filter": ["lowercase", "porter_stem"] } }, "filter": { "protect_cats": { "type": "keyword_marker", "keywords_pattern": ".*\\*" } } } } }
and put this to test_index via put request. I expected elasticsearch to return token "cats*" or at least "cats" after executed "/_analyze?text=cats*&analyzer=protect_cats" but I got "cat" instead. How to achieve desired result? Thanks.