lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com.INVALID>
Subject Re: accessing field values from documents in custom searchComponent for solr 4.4 .
Date Sat, 21 Jun 2014 17:33:31 GMT
Hi Pavan,

I used org.apache.solr.util.SolrPluginUtils.docListToSolrDocumentLis in the past. 

Ahmet


On Saturday, June 21, 2014 6:18 PM, Pavan Kumar <pavan@zettata.com> wrote:
Hi,

I am trying to implement a custom SearchComponent for solr 4.4 and need to
access a few fields for the all the documents (docId's) returned by
QueryComponent .


I see there is a retrievedDocuments map in response builder . But it is not
populated . Is there a field i have to set in the solr query url  to
populate this fields . I have set fl=<reqired fields>.

Currently am trying to access the docs/field using SolrIndexSearcher.

SolrIndexSearcher searcher ;
searcher.doc(itr.next()).getField("field1");
//where itr is the docListIterator

This is slow if the documentCache dose not have toe dock .

Is there a better way to access one single field for all the documents
returned by QueryComponenet .


My query looks like this :

http://
<machine>/solr/<corename>/select_exp?q=shirts&wt=xml&indent=true&defType=edismax&qf=field1_st+catchall_st&stopwords=true&lowercaseOperators=true&rows=1000&fsv=true&fl=field1%20field_2%20score&debugQuery=true

Thanks,
Pavan


Mime
View raw message