How to save JSON output in seperate index


(nivetha) #1

I have wriiten JSON query.. how do I save this output to a new index??
myquery:
GET /pps_trans/_search?
{
"query": {
"filtered": {
"query":
{
"bool": {
"must_not": [
{"term" : { "ReqType": null }}
]
}
}
,
"filter": { "range": {
"@timestamp": {
"from": "2015-10-04T00:00:00.000Z",
"to":"2015-10-05T00:00:00.000Z"
}
}}
}

}
, "aggs": {
"TimeBucket": {
"histogram": {
"field": "@timestamp",
"interval": 50
}

, "aggs": {
"RequestBucket": {
"terms": {
"field": "ReqType",
"size": 10
}
,"aggs": {
"LogBucket": {
"terms": {
"field": "Log",
"size": 10
}
,"aggs": {
"ResponseBucket": {
"terms": {
"field": "ResCode",
"size": 10
}
,"aggs": {
"BookingsBucket": {
"terms": {
"field": "BookingType",
"size": 10
}
,"aggs": {
"ErrorBucket": {
"terms": {
"field": "ErrorCode",
"size": 10
}
}
}
}
}
}
}

}
}
}
}
}
}
}


(Mark Walkom) #2

You need to run the query and then pipe it into a different PUT request to ES.


(nivetha) #3

Thanks warkolm , Could you please provide me with links based on this.


(Mark Walkom) #4

We don't have documentation on this particular method.


(system) #5