Hi Guys,
I'm Using Json plugin in filter and trying to fetch a value which resides in below json path.
parsedJson.query.bool.filter[0].bool.must[0].bool.must[2].term["list_attributes.orderId.long"].value
and actually complete json looks like below.
{
"_source": false,
"from": 0,
"query": {
"bool": {
"filter": [
{
"bool": {
"must": [
{
"bool": {
"must": [
{
"bool": {
"must_not": [
{
"terms": {
"list_attributes.id.long": [
123456
],
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
{
"term": {
"list_attributes.xxxx.long": {
"value": 123456,
"boost": 1
}
}
},
{
"term": {
"list_attributes.orderId.long": {
"value": 12345,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
{
"term": {
"active": {
"value": true,
"boost": 1
}
}
},
{
"term": {
"deleted": {
"value": false,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"size": 24,
"sort": [
{
"attributes.startdate": {
"order": "desc",
"missing": "_last",
"unmapped_type": "long"
}
}
],
"version": true
}
And, So In Filter plugin I've used below json path to get the value of orderId, but Its not extracting the value, can anyone help me in escaping double Quotes ? or How can we extract such values using json paths?
mutate{
add_field => {"orderId" => "%{[parsedJson][query][bool][filter][0][bool][must][0][bool][must][2][term]["list_attributes.orderId.long"][value]}"}
}
mutate{
add_field => {"orderId" => "%{[parsedJson][query][bool][filter][0][bool][must][0][bool][must][2][term][\"list_attributes.orderId.long\"][value]}"}
}
Thanks,
Vaseem