ElasticSearch Filter Query

How can i give apply JSON object value for filter.

Example Code:

"city": "Costa Mesa",
"stateProvinceGeoId": "USA_CA",
"countryGeoId": "USA",
"postalCode": "92627",
"entryDate": 1564829397315,
"placedDate": 1556317970000,
"statusId": "OrderCompleted",
"productStoreId": "TASL_SHOPIFY",
"salesChannelEnumId": "ScShopify",
"currencyUomId": "USD",
"grandTotal": 94.81,
"statusLogs": [
"oldStatusId": "OrderApproved",
"newStatusId": "OrderCompleted",
"statusChangedDate": 1564835368738,
"statusChangedByUserId": "EX_JOHN_DOE"
"oldStatusId": "OrderPlaced",
"newStatusId": "OrderApproved",
"statusChangedDate": 1564829407686
"oldStatusId": "OrderOpen",
"newStatusId": "OrderPlaced",
"statusChangedDate": 1564829397603,
"statusChangedByUserId": "EX_JOHN_DOE"
"newStatusId": "OrderOpen",
"statusChangedDate": 1564829397316,
"statusChangedByUserId": "EX_JOHN_DOE"

I can access countryGeoId, currencyUomId, etc.... directly, but not able to give oldStatusId beacuse it's inside of statusLogs. How can i write filter query?

Example Query:

Map totalOrders = [bool: [filter: [
[range: [placedDate: [gte:(startDate.time as String), lt:(endDate.time as String), format: 'epoch_millis']]],
[terms: [statusId: ['OrderCompleted']]]

How is this related to Logstash? From what I can tell you may want to move this to the Elasticsearch category.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.