# Question about sub-field:value query

**URL:** <https://discuss.elastic.co/t/question-about-sub-field-value-query/175501>\
**Category:** Elasticsearch\
**Created:** [April 5, 2019, 2:13am UTC](https://discuss.elastic.co/t/question-about-sub-field-value-query/175501 "2019-04-05T02:13:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jasony](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jasony](https://discuss.elastic.co/u/jasony)\
**Post date:** [April 5, 2019, 2:13am UTC](https://discuss.elastic.co/t/question-about-sub-field-value-query/175501/1 "2019-04-05T02:13:29Z")

</div>

Hello,

I am currently working on snapshots for some indices in my cluster. I am planning to store \_status query result into an index in elasticsearch after the snapshot job is completed.

a part of \_status results are as below.

Is there a query to parse “server-metrics” as a value (highlighted as bold below)?  
It is a properties of “indices” and I guess the query I am looking for might be different from getting 0 value from "indices.server-metrics.shards\_stats.initializing" field.

Please advise.

{  
"snapshots" : [  
{  
...  
"indices" : {  
**"server-metrics"** : {  
"shards\_stats" : {  
"initializing" : 0,  
"started" : 0,  
"finalizing" : 0,  
"done" : 1,  
"failed" : 0,  
"total" : 1  
},  
…  
}  
}  
}  
]  
}

Thanks!

---

<div class="post-metadata">

**Author:** ![jasony](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jasony](https://discuss.elastic.co/u/jasony)\
**Post date:** [April 7, 2019, 2:57am UTC](https://discuss.elastic.co/t/question-about-sub-field-value-query/175501/2 "2019-04-07T02:57:22Z")

</div>

I solved this problem by setting ingest pipeline for adding the target value as separate kv.

Is there anyone know how I can directly query above value (without adding ingest pipeline), please let me know.

thanks!

---

<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 5, 2019, 2:57am UTC](https://discuss.elastic.co/t/question-about-sub-field-value-query/175501/3 "2019-05-05T02:57:23Z")

</div>

Closed on May 5, 2019, 2:57am UTC

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