lucene-ruby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Solr-ruby crashing "(eval):1: Illegal octal digit"
Date Wed, 17 Oct 2007 15:10:52 GMT
Looks like your zip_code field should be made a string data type  
instead of numeric.   How do you have it defined in your schema.xml?

That is quite possibly a bug in the response writer, but that could  
be tricky for the Java code to write out out legal numerics.

I've been considering writing a custom solr-ruby specific Solr  
response writer so dates and ordered hashes come out in a friendly  
Ruby format - this might be another case where this could be handy -  
however this is illegal Ruby code it seems.  Making it a string type  
would likely do the trick though.

	Erik


On Oct 17, 2007, at 3:58 AM, Thiago Jackiw wrote:

> For some reason solr-ruby is crashing when returning the response
> below. It works fine if I try the same query directly without using
> solr-ruby. Any ideas?
>
> Query:
> ?wt=ruby&fl=zip_code&q=accounting
>
> Response:
> {'responseHeader'=>{'status'=>0,'QTime'=>1,'params'=> 
> {'wt'=>'ruby','rows'=>'1','start'=>'5','q'=>'accounting','fl'=>'zip_co

> de','qt'=>'standard'}},'response'=> 
> {'numFound'=>15005,'start'=>5,'docs'=>[{'zip_code'=>[08817]}]}}
>
> Error message:
> solr/response/ruby.rb:30:in `initialize': invalid ruby code:
> (eval):1:in `initialize': compile error (Solr::Exception) (eval):1:
> Illegal octal digit
>
> Thanks,
>
> Thiago


Mime
View raw message