Skip to content

Instantly share code, notes, and snippets.

@QuantVI
Created July 23, 2019 23:07
Show Gist options
  • Select an option

  • Save QuantVI/e78b51e7f1d07b45ab6cff23724d0d12 to your computer and use it in GitHub Desktop.

Select an option

Save QuantVI/e78b51e7f1d07b45ab6cff23724d0d12 to your computer and use it in GitHub Desktop.

Revisions

  1. QuantVI created this gist Jul 23, 2019.
    24 changes: 24 additions & 0 deletions total_room_Rate_ranges.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    { "size": 0,
    "query": {
    "term": {"propertyId":"{{property_id}}"}
    },
    "aggs" : {
    "zero_or_not": {
    "range" : {
    "field" : "totalRoomRateInPropertyCurrency",
    "ranges" : [
    {"from": 0, "to" : 0.1 },
    { "from" : 1}
    ]
    },
    "aggs": {
    "total_room_rate_range": {
    "histogram" : {
    "field" : "totalRoomRateInPropertyCurrency",
    "interval" : 500
    }
    }
    }
    }
    }
    }