ElasticSearch TermVectors using Java


(Kyriakos) #1

Hello, is this a way to do something like this using java ?

GET /imdb/movies/_termvectors
{
"doc": {
"plot": "When wealthy industrialist Tony Stark is forced to build an armored suit after a life-threatening incident, he ultimately decides to use its technology to fight against evil."
},
"term_statistics" : true,
"field_statistics" : true,
"positions": false,
"offsets": false,
"filter" : {
"max_num_terms" : 3,
"min_term_freq" : 1,
"min_doc_freq" : 1
}
}


(Simon Willnauer) #2

if you use the java client do something like this:

TermVectorsRequest request = new TermVectorsRequest("imdb", "movies");
request.doc(theDocument);
client.termVectors(request).actionGet();

hope that helps


(system) #3

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