lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Integration Problem
Date Thu, 29 Jul 2010 19:31:31 GMT

: I tried to do that with a custom query handler and a custom response
: writer and i'm able to write in the response msg of solr but only in the
: response node of the xml msg an not in the results node.

i would strongly advise against tyring to modify the <result/> block in 
any way -- that will only cause confusion for clients trying to access 
your solr install using clients that expect the default format.

you are probably much better off just using a stock ResponseWriter and 
having your RequestHandler modify the SolrQueryResponse object to include 
your data as regular simple objects.

If you goal is to add psuedo-fields to each document in the results, then 
you could convert any DocList you encounter to a SolrDocumentList and 
modify those Documents to add your additional field values -- then the 
stock response writers will take care of formatting things for you -- but 
agian: i would advise that.  if you look ta how things like highlighting 
work, they just use a parallel list of documents that is easy to map 
(there is an open issue to standardize a way for plugins to add "meta 
fields" per doc, but until that's official the parallel list approach is 
the best way to deal with stuff like this in a way that won't cause 
problems with clients or when upgrading Solr)


-Hoss


Mime
View raw message