lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject RequestHandler -> XML/JSON/etc. response?
Date Fri, 16 Feb 2007 20:26:53 GMT
Hi,



I'm still torturing SOLR-81 - the spellchecker fronted with a Solr RequestHandler.

Being a RequestHandler virgin, I'm not sure how to go from getting the alternative

spelling suggestion(s) in the RequestHandler, to the output that might look something

like this (made it up on the spot, please point out any weaknesses):



<?xml version="1.0" encoding="UTF-8"?>

<response>

<responseHeader>Is the response header really needed?</responseHeader>



<result numSuggestions="N">

 <suggestion>suggestion 1</suggestion>

 ...

 <suggestion>suggestion N</suggestion>

</result>

</response>



I'm looking at StandardRequestHandler, trying to base y RequestHandler on it, but I don't
see where the results get XML-ified.
I see  rsp.add("response",results.docList);  and friends, but it's not clear to me at this
crazy hour at night how that makes it to the XMLWriter or XMLResponseWriter, or some other
class that finally spits out XML.

Can somebody please point me in the right direction?

Thanks,

Otis






Mime
View raw message