# JSONPath query on Elasticsearch?

**URL:** <https://discuss.elastic.co/t/jsonpath-query-on-elasticsearch/145297>\
**Category:** Elasticsearch\
**Created:** [August 21, 2018, 6:39am UTC](https://discuss.elastic.co/t/jsonpath-query-on-elasticsearch/145297 "2018-08-21T06:39:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siddharth\_Trikha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/siddharth_trikha/32/133867_2.png) [@Siddharth\_Trikha](https://discuss.elastic.co/u/Siddharth_Trikha)\
**Post date:** [August 21, 2018, 6:39am UTC](https://discuss.elastic.co/t/jsonpath-query-on-elasticsearch/145297/1 "2018-08-21T06:39:03Z")

</div>

I have a resource in my JAVA data model such as:

```
{
   "user" : {
      "name" : "elastic",
      "creator" : "name",
       
      "content": {
            key1: vall1,
            key2: vall2,
            key3: vall3,
            ..........
       }
   }
}

```

So there are normal attributes name, creator, etc which are there and one attribute is "content" which would contain a JSON representation.

Now, the requirement is that the client can send a JSONPath query like to get all users with **key1\> 1000**.

So if I store my data in ES, how can I run the JSONPath query directly on ES to retrieve all users with content's **key1\> 1000**??

Is it possible to run the JSONPath query on ES ??

Otherwise, I would have to write a translator from JSONPAth to ES query which would be cumbersome.

Any help is appreciated.

---

<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:** [September 18, 2018, 6:39am UTC](https://discuss.elastic.co/t/jsonpath-query-on-elasticsearch/145297/2 "2018-09-18T06:39:14Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
