My problem was that spellcheck component was missing from /itas handler.

With that in place, I could use 
$response.response.spellcheck.suggestions.collation (no idea why I needed 
$response.response?) to pick up the spellcheck.

Now it works quite well: 
http://ec2-79-125-69-12.eu-west-1.compute.amazonaws.com:8983/solr/itas?q=conector

Perhaps I should submit this as my first patch to the Solr project :)

--
Jan Høydahl  - search architect
Cominvent AS - www.cominvent.com

On 11. feb. 2010, at 15.06, Erik Hatcher wrote:

> Let me understand the issue... Have you added spellchecking parameters to the 
> /itas mapping in solrconfig.xml?   If so, you should be able to do 
> /itas?q=mispeled&wt=xml and see the suggestions in the response.  If you've 
> gotten that far you'll be able to navigate to them using the object 
> navigation of $response in the templates.
> 
> The output of $response, just to be clear, isn't really JSON, it's a 
> toString() that looks similar though.  Or did you convert it to JSON in some 
> other fashion?  /itas?q=mispeled&wt=json should also show the spelling 
> suggestions.
> 
>       Erik
> 
> On Feb 9, 2010, at 7:30 PM, Jan Høydahl / Cominvent wrote:
> 
>> Hi,
>> 
>> I'm using the /itas requestHandler, and would like to add spell-check 
>> suggestions to the output.
>> I'm having spell-check configured and working in the XML response writer, 
>> but nothing is output in Velocity. Debugging the JSON $response object, I 
>> cannot find any representation of spellcheck response in there.
>> 
>> Where do I plug that in?
>> 
>> --
>> Jan Høydahl  - search architect
>> Cominvent AS - www.cominvent.com
>> 
> 

Reply via email to