Regarding official GoLang client of elasticsearch

I was using olivere Elasticsearch-golang client for my project.
But i came across .
Here is an example of code:

in this,

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.


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