# Querying based on a sketch in Elastic search

**URL:** <https://discuss.elastic.co/t/querying-based-on-a-sketch-in-elastic-search/59475>\
**Category:** Elasticsearch\
**Created:** [August 31, 2016, 10:35pm UTC](https://discuss.elastic.co/t/querying-based-on-a-sketch-in-elastic-search/59475 "2016-08-31T22:35:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramaniarun01](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@ramaniarun01](https://discuss.elastic.co/u/ramaniarun01)\
**Post date:** [August 31, 2016, 10:35pm UTC](https://discuss.elastic.co/t/querying-based-on-a-sketch-in-elastic-search/59475/1 "2016-08-31T22:35:07Z")

</div>

Hi,

I have a sketch pushed to elastic search but I am not able to perform any aggregate operation on that sketch.

Please help.

Thanks  
Arun Ramani

---

<div class="post-metadata">

**Author:** ![mainec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mainec/32/5557_2.png) [@mainec](https://discuss.elastic.co/u/mainec)\
**Post date:** [September 1, 2016, 9:41am UTC](https://discuss.elastic.co/t/querying-based-on-a-sketch-in-elastic-search/59475/2 "2016-09-01T09:41:37Z")

</div>

I'm sorry, I don't quite understand what you are trying to do. Can you elaborate a bit, or provide some curl reproduction of the steps you took so others can follow along?

---

<div class="post-metadata">

**Author:** ![ramaniarun01](https://avatars.discourse-cdn.com/v4/letter/r/848f3c/32.png) [@ramaniarun01](https://discuss.elastic.co/u/ramaniarun01)\
**Post date:** [September 1, 2016, 5:56pm UTC](https://discuss.elastic.co/t/querying-based-on-a-sketch-in-elastic-search/59475/3 "2016-09-01T17:56:21Z")

</div>

Hi,

I am sorry for not being clear. I have a sketch column generated and pushed to elastic search as a binary column. I am trying to compute distinct count using the cardinality API for various different dimensions. Unfortunately, the query does not work for the sketch column which is unique count.

P.S - This is the curl command I am trying to execute:

curl -XGET 'http://\<ES\_HOST\_NAME\>:9200/type/\_search/?browser="Chrome"' -d '{ "size" : 0, "aggs" : { "distinct\_count" : { "cardinality" : { "field" : "unique\_user\_count"} } } }'

Thanks  
Arun Ramani

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:23pm UTC](https://discuss.elastic.co/t/querying-based-on-a-sketch-in-elastic-search/59475/4 "2017-07-05T22:23:08Z")

</div>


