Hey guys,
I'm trying so use Multisearch API. But I got an bad json eof exception.
Here is my case:
How I build my template:
POST _scripts/t1
{
"script": {
"lang": "mustache",
"source": {
"query": {
"match_phrase": {
"{{field}}": "{{value}}"
}
}
}
}
}
So I looked at my template
GET _scripts/t1Returns:
{
"_id": "t1",
"found": true,
"script": {
"lang": "mustache",
"source": """{"query":{"match_phrase":{"{{field}}":"{{value}}"}}}""",
"options": {
"content_type": "application/json; charset=UTF-8"
}
}
}
So now I want to get results with:
POST processlog/_msearch/template
{}
{
"id": "t1",
"params": {
"field": "Envrionment",
"value": "Test"
}
}
{}
{
"id": "t1",
"params": {
"field": "Envrionment",
"value": "Integration"
}
}
I got the exception:
{
"error": {
"root_cause": [
{
"type": "json_e_o_f_exception",
"reason": "Unexpected end-of-input: expected close marker for Object (start marke r at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@71 7c0d8d; line: 1, column: 1])\n at [Source: org.elasticsearch.transport .netty4.ByteBufStreamInput@717c0d8d; line: 2, column: 3]"
}
],
"type": "json_e_o_f_exception",
"reason": "Unexpected end-of-input: expected close marker for Object (start marke r at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@71 7c0d8d; line: 1, column: 1])\n at [Source: org.elasticsearch.transport .netty4.ByteBufStreamInput@717c0d8d; line: 2, column: 3]"
},
"status": 500
}
Whats wrong in my case?
Thanks for helping me guys
)