# Query matadata using jest

**URL:** <https://discuss.elastic.co/t/query-matadata-using-jest/21528>\
**Category:** Elasticsearch\
**Created:** [January 8, 2015, 12:10am UTC](https://discuss.elastic.co/t/query-matadata-using-jest/21528 "2015-01-08T00:10:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikulb](https://avatars.discourse-cdn.com/v4/letter/n/919ad9/32.png) [@nikulb](https://discuss.elastic.co/u/nikulb)\
**Post date:** [January 8, 2015, 12:10am UTC](https://discuss.elastic.co/t/query-matadata-using-jest/21528/1 "2015-01-08T00:10:37Z")

</div>

Hello,

My query result (match all) using head plugin search:  
locahost:9200/mydb/mycollect/\_search

{

```
"took": 1,
"timed_out": false,
"_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
},
"hits": {
    "total": 1,
    "max_score": 1,
    "hits": [
        {
            "_index": "mydb",
            "_type": "mycollect",
            "_id": "54ac6333b760d23c7635ce0b",
            "_score": 1,
            "_source": {
                "content": {
                    "_content_type": "String",
                    "_title": "def.xml",
                    "_content": 

```

"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI"  
},  
"filename": "def.xml",  
"contentType": "String",  
"md5": "4f5cfde85d1b6f48658b82af980714c7",  
"length": 2438,  
"chunkSize": 261120,  
"uploadDate": "2015-01-06T22:35:31.289Z",  
"metadata": {  
"Description": "def XML File",  
"tags": [  
"def"  
,  
"XML"  
]  
}  
}  
}  
]  
}

}

I'm able to find "filename". But wondering how do I fetch "Description" &  
"tags" fields from "metadata".

I'm using Jest client to execute search which is not returning  
"Description" field contents:

SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();  
searchSourceBuilder.query(QueryBuilders.wildcardQuery("Description", "\*"));

```
     Search search = new Search.Builder(searchSourceBuilder.toString())
                                     // multiple index or types can be 

```

added.  
.addIndex("mydb")  
.addType("mycollect")  
.build();

Appreciate your help.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/343c8ac1-4b7b-48b9-b31c-abcbba61d72d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/343c8ac1-4b7b-48b9-b31c-abcbba61d72d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:40am UTC](https://discuss.elastic.co/t/query-matadata-using-jest/21528/2 "2017-07-06T00:40:13Z")

</div>


