-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search call fails with message: 'Unable to parse/serialize body' #22
Comments
Doesn't look like you are doing anything wrong. There is an error in the JSON, in the _source field... Can you try running the requests with curl to see if you get the same response body?
|
Good, I thought so. This is the curl output: {
"took" : 14,
"timed_out" : false,
"_shards" : {
"total" : 3,
"successful" : 3,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.19178301,
"hits" : [ {
"_index" : "places",
"_type" : "snackbar",
"_id" : "1",
"_score" : 0.19178301, "_source" : {heading:"Het Geveltje", text: "Foo"}
} ]
}
} I don't see a JSON error in the source field? Or do you mean that the error msg implies that there should be one? |
The heading and text keys need to be wrapped in quotes for it to be valid json |
|
Looks like you are indexing invalid JSON. Elasticsearch will still parse it sometimes, and when it succeeds it will return the original source to you. elastic/elasticsearch#586 Can you verify that this is the case? |
Running latest, 0.90.9. But indeed, that was the case, indexed invalid JSON! This was confusing though, missed those quotes. Thanks a lot! |
I ran into this today. We are using a river to load data. I deleted the indexes and the rivers, then re-added them and things were better. Hopefully that helps others. This thread was very helpful for me. |
This helps me too. |
…06064946 Exec tachikoma update 20150706064946
When executing a query I get the mentioned message. Here is some example code:
This is the result of running it:
I don't understand what I'm doing wrong here?
The text was updated successfully, but these errors were encountered: