lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Majid Laali <mjla...@gmail.com>
Subject Re: How can I parse the TermVectorComponent response in SolrJ
Date Thu, 04 Jun 2015 15:37:24 GMT
Hi, 

Based on a few hours googling, I concluded that there is no class in SOLR 5.1 that can parser
JSON response of The Term Vector Component. 
I am not sure if it is fine to create an issue in the SOLR JIRA website and make patch to
address it. 

I would be grateful to get any advice for that.

Thanks, 
Majid



> On May 22, 2015, at 5:49 PM, Majid Laali <mjlaali@gmail.com> wrote:
> 
> 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
> *******************************************/


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message