# Are there any elasticsearch query close to mongodb projection?

**URL:** https://discuss.elastic.co/t/are-there-any-elasticsearch-query-close-to-mongodb-projection/176529
**Category:** Elasticsearch
**Created:** [April 12, 2019, 3:53am UTC](https://discuss.elastic.co/t/are-there-any-elasticsearch-query-close-to-mongodb-projection/176529 "2019-04-12T03:53:14Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![fqewgvjreuibhjroihbj](https://avatars.discourse-cdn.com/v4/letter/f/ba8739/32.png) [@fqewgvjreuibhjroihbj](https://discuss.elastic.co/u/fqewgvjreuibhjroihbj)
#### Post date: [April 12, 2019, 3:53am UTC](https://discuss.elastic.co/t/are-there-any-elasticsearch-query-close-to-mongodb-projection/176529/1 "2019-04-12T03:53:14Z")

</div>

if i want to do projection with my data like following

```auto
{
    "ProductName": {
        "WORLDWIDE": {
            "zh": "产品 1",
            "en": "product 1"
        },
        "CHINA": {
            "zh": "产品 2",
            "en": "product 2"
        }
    }
}

```

to

```auto
{
    "ProductName": "产品 2"
}

```

with some judgement then get specific data inside of `ProductName`

which kind of query json format should i use?  
it's kind like mongodb aggergate projection

---

<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: [May 10, 2019, 3:53am UTC](https://discuss.elastic.co/t/are-there-any-elasticsearch-query-close-to-mongodb-projection/176529/2 "2019-05-10T03:53:19Z")

</div>

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