Hi, 

I have a java program that sends a query to solr and get the term vector of a 
document. Something like this:

SolrQuery solrQuery = new SolrQuery();
solrQuery.setRequestHandler("/tvrh");
solrQuery.setQuery("id:" + id);
solrQuery.setParam("fl", textField);
solrQuery.setParam("tv.tf", "true");
solrQuery.setParam("tv.df", "true");
solrQuery.setParam("tv.tf_idf", "true");
solrQuery.setRows(1);
QueryResponse docTVResponse = solrClient.query(solrQuery);
Object termVectors = docTVResponse.getResponse().get("termVectors”);

I am wondering if there is a class that can wrap the termVecotrs object so that 
I can access to tf, idf of terms or I have to manually parse the json response 
of TermVectoreComponent. 

Thanks in advance, 
Majid


/*******************************************
 *   Majid Laali, Ph.D. Candidate, 
 *   Computer Science & Software Engineering Department
 *   Concordia University
*******************************************/

Reply via email to