lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavan Kumar <pa...@zettata.com>
Subject accessing field values from documents in custom searchComponent for solr 4.4 .
Date Sat, 21 Jun 2014 15:15:30 GMT
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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message