Hi everybody,

I cannot figure out how to get the index name in a facet script with ES 
0.90.13.
I tried the following syntax but neither of them didn't work:


with doc:

* {*
*   "size": 0,  *
*    "facets" : {*
*      "indices" : { "terms" : {"script" : "doc['_index'].value"} }*
*    }*
*  }*


with _source:


* {*
*   "size": 0,  *
*    "facets" : {*
*      "indices" : { "terms" : {"script" : "_source['_index']"} }*
*    }*
*  }*



Both of 2 syntax above return:
"facets": {
        "indices": {
            "_type": "terms",
            "missing": 36289,
            "total": 0,
            "other": 0,
            "terms": []
        }
}

Should I use my own field instead of the built-in  "_index" ?


Thanks.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/32c05c7b-9e76-43e5-b0e3-05d663219cd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to