lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Majid Laali <>
Subject How can I parse the TermVectorComponent response in SolrJ
Date Fri, 22 May 2015 21:49:51 GMT

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.setQuery("id:" + id);
solrQuery.setParam("fl", textField);
solrQuery.setParam("", "true");
solrQuery.setParam("tv.df", "true");
solrQuery.setParam("tv.tf_idf", "true");
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 Laali, Ph.D. Candidate, 
 *   Computer Science & Software Engineering Department
 *   Concordia University
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message