I'm trying to calculate a value for each hit then select or filter on a 
calculated value. Something like below: 

    "query": {
        "match_all": {}
        },
        "script_fields" : {
            "counter" : {
                "script" : "count++",
                "params" : {
                    "count"  : 1
                }
            },
            "source" : {
              "script" : "_source"
        }
      }

I'd like to filter on the count parameter.

I've read on a StackOverflow post that you cannot filter on a script value.

So is there another way to calculate some value dynamically and filter on 
that value? 

If not, is there a nested SQL SELECT equivalent in ElasticSearch? Maybe I 
could execute the first query to calculate the 'count' then execute another 
query to filter by a value?

-- 
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/8206ea84-b314-4b8e-8f3c-248d9f5a99e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to