The parameter `char_filters` is not used in analyze POST api #15657

medcl opened this Issue Dec 24, 2015 · 1 comment


None yet
2 participants

medcl commented Dec 24, 2015

Test under 2.0.0 and 2.1.0;
A simple custom analyzer test,use POST analyze api

curl -XPOST 'localhost:9200/_analyze' -d '
  "char_filters" : ["html_strip"],
  "tokenizer" : "keyword",
  "text" : "this is a <b>test</b>"

as you can see the result below,the char_filters doesn't remove neither < or >,it seems not working:

{"tokens":[{"token":"this is a <b>test</b>","start_offset":0,"end_offset":21,"type":"word","position":0}]}                                                          

now try to test the above config via the GET api again,

curl -XGET 'localhost:9200/_analyze?tokenizer=keyword&token_filters=lowercase&char_filters=html_strip' -d 'this is a <b>test</b>'

the result is correct:

{"tokens":[{"token":"this is a test","start_offset":0,"end_offset":21,"type":"word","position":0}]}

This comment has been minimized.

Show comment
Hide comment

johtani Dec 28, 2015


Duplicate. already fixed in 2.2


johtani commented Dec 28, 2015

Duplicate. already fixed in 2.2

@johtani johtani closed this Dec 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment