# Regarding official GoLang client of elasticsearch

**URL:** <https://discuss.elastic.co/t/regarding-official-golang-client-of-elasticsearch/199788>\
**Category:** Elasticsearch\
**Created:** [September 17, 2019, 8:34am UTC](https://discuss.elastic.co/t/regarding-official-golang-client-of-elasticsearch/199788 "2019-09-17T08:34:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MKU](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mku/32/48327_2.png) [@MKU](https://discuss.elastic.co/u/MKU)\
**Post date:** [September 17, 2019, 8:34am UTC](https://discuss.elastic.co/t/regarding-official-golang-client-of-elasticsearch/199788/1 "2019-09-17T08:34:21Z")

</div>

I was using olivere Elasticsearch-golang client for my project.  
But i came across https://www.elastic.co/guide/en/elasticsearch/client/go-api/current/index.html .  
Here is an example of code:  
https://github.com/elastic/go-elasticsearch

in this,

```auto
for _, hit := range r["hits"].(map[string]interface{})["hits"].([]interface{}) {
    log.Printf(" * ID=%s, %s", hit.(map[string]interface{})["_id"], hit.(map[string]interface{})["_source"])
  }

```

how do i perform source filtering?  
I figured out i have to use **WithSourceIncludes()** function, but for some reason i am not able to use that function.  
can you help me out here.

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:** [October 15, 2019, 8:34am UTC](https://discuss.elastic.co/t/regarding-official-golang-client-of-elasticsearch/199788/2 "2019-10-15T08:34:21Z")

</div>

Closed on October 15, 2019, 8:34am UTC

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