Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@locus.apache.org Received: (qmail 12454 invoked from network); 16 Feb 2007 21:11:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2007 21:11:17 -0000 Received: (qmail 98772 invoked by uid 500); 16 Feb 2007 21:11:23 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 98554 invoked by uid 500); 16 Feb 2007 21:11:20 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 98368 invoked by uid 99); 16 Feb 2007 21:11:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 13:11:19 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ryantxu@gmail.com designates 64.233.166.176 as permitted sender) Received: from [64.233.166.176] (HELO py-out-1112.google.com) (64.233.166.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Feb 2007 12:38:04 -0800 Received: by py-out-1112.google.com with SMTP id a25so672958pyi for ; Fri, 16 Feb 2007 12:37:43 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Z+Btz4T8XFIR6beojqPjQ2NvgTIrPNOL0DJg4+eK7oc02KtBeV5Puvxc2YFVbf7j+Z44lhsHvJAZL5gK9rmVuQmWkJSOcjO9JTRgTKn21On08QxzBMUSKQo3+dQwiIgyHWe4BGsQrvHPWzIgaIZf92hShgLpZ3SQSd1oRiXe7vc= Received: by 10.35.79.3 with SMTP id g3mr6921067pyl.1171658263743; Fri, 16 Feb 2007 12:37:43 -0800 (PST) Received: by 10.35.84.13 with HTTP; Fri, 16 Feb 2007 12:37:43 -0800 (PST) Message-ID: <176776ee0702161237l36b453a1g14e8e588a3969a33@mail.gmail.com> Date: Fri, 16 Feb 2007 12:37:43 -0800 From: "Ryan McKinley" To: solr-dev@lucene.apache.org Subject: Re: RequestHandler -> XML/JSON/etc. response? In-Reply-To: <249013.13532.qm@web50313.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <249013.13532.qm@web50313.mail.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org why not just the standard list format so we don't have to write new parsers :) List suggestions = new ArrayList(); suggestions.add( "suggestion 1" ); suggestions.add( "suggestion 2" ); suggestions.add( "suggestion 3" ); suggestions.add( "suggestion 4" ); rsp.add( "suggestions", suggestions ); gives: suggestion 1 suggestion 2 suggestion 3 suggestion 4 or: "suggestions":[ "suggestion 1", "suggestion 2", "suggestion 3", "suggestion 4"], we can get the numSuggestions from the array length ryan On 2/16/07, Otis Gospodnetic wrote: > 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): > > > > > > > > Is the response header really needed? > > > > > > suggestion 1 > > ... > > suggestion N > > > > > > > > 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 > > > > > >