简体   繁体   中英

Elasticsearch 6.2.4 [400] {“error”:{“root_cause”:[{“type”:“illegal_argument_exception”,“reason”:“text is empty (possibly HTTP/0.9)”}]

I am using Elasticsearch 6.2.4 with my RoR application using elasticsearch-rails and elasticsearch-model.

My indexation is runninng without getting any errors. but when I try to perform a search from the application I am getting this error from Elasticsearch

<Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"}],"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"},"status":400}>

Everything was working normal prior to the upgrade of Elasticsearch from 1.5 to 6.2.4

I simplified my search query to try narrowing down the problem.

q = { "query" => { "match_all" => {} } }

But I still getting the same error. Probably I am not specifying a type in the query but wouldn't be unnecessary since I have a match_all condition ?

> {"query":{"match_all":{}}}
< {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"}],"type":"illegal_argument_exception","reason":"text is empty (possibly HTTP/0.9)"},"status":400}

I am brand new to Elasticsearch so excuse me in advance if there are some evident stuff that I am missing

Do you have any idea what is causing this error ? If you need more specific info just ask and I'll update this question.

Thanks.

Search request from application is resulting in HTTP 400 Bad Request. Are you able to perform a search request from outside the application ie invoking a curl command from your local etc ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM