[source, ruby]
----
response = client.search(
  index: 'my_index',
  body: {
    query: {
      script_score: {
        query: {
          match_all: {}
        },
        script: {
          source: "field('my_counter').asBigInteger(BigInteger.ZERO).floatValue()"
        }
      }
    }
  }
)
puts response
----
