0

I'm using ElasticSearch-Hadoop API. And I was trying to get _mtermvector by using the following Spark code:

val query= """_mtermvectors {
        "ids" : ["1256"],
        "parameters": {
            "fields": [
                 "tname"
            ],
            "term_statistics": true
        }
}"""
var idRdd = sparkContext.esRDD("uindex/type1",query)

It didn't work, any ideas please, appreciate!

zero323
  • 322,348
  • 103
  • 959
  • 935
Jack
  • 5,540
  • 13
  • 65
  • 113
  • Could you share some more info? Does a simple query like: "{"query": { "match_all": {}}}" work? – Eyal.Dahari Jun 29 '16 at 21:39
  • But I don't know where should I put _mtermvectors, if you wanna get term vectors you have to use the handler _mtermvectors. – Jack Jun 29 '16 at 22:02

1 Answers1

2

You can't use endpoints (like _mtermvectors) which are part of the document API's with ES-Hadoop. Only queries which belongs to the query API's, query DSL or external resource are allowed.

Hope that it helps.

Eyal.Dahari
  • 760
  • 6
  • 13