Hi,

I am trying to use this aggregation which does not work:
"aggs": {
    "winners": {
      "terms": {
        "field": "urls",
        "order": {
          "diff": "desc"
        }
      },
      "aggs": {
        "diff": {
          "sum": {
            "script": "(doc['datetime'].date.getMillis() < 1406332800000) ? 
-1 : 1",
            "lang": "groovy"
          }
        }
      }
    }
  }

Can anyone help?

Cheers,
Valentin

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/df03d929-afea-4cdb-9a15-926f746223a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to