elasticsearch/elasticsearch — Issue #1767: Analyze API not handling text in post body correctly
Author: clintongormley
Created: 2012-03-08 08:05:53+00:00
State: open

Compare query string request:

curl -XGET 'http://127.0.0.1:9200/_analyze?pretty=1&text=hello_world12&analyzer=simple'

# [Thu Mar 8 09:02:58 2012] Response:
# {
# "tokens" : [
# {
# "end_offset" : 5,
# "position" : 1,
# "start_offset" : 0,
# "type" : "word",
# "token" : "hello"
# },
# {
# "end_offset" : 11,
# "position" : 2,
# "start_offset" : 6,
# "type" : "word",
# "token" : "world"
# }
# ]
# }

with body request (incorrect):

curl -XGET 'http://localhost:9200/_analyze?analzyer=simple&pretty=1' -d 'hello_world12'
{
"tokens" : [ {
"token" : "hello_world12",
"start_offset" : 0,
"end_offset" : 13,
"type" : "",
"position" : 1
} ]
}