lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher (JIRA)" <j...@apache.org>
Subject [jira] Updated: (SOLR-394) Ruby response writer emits invalid integers for numbers stored with leading zeros
Date Thu, 25 Oct 2007 20:32:51 GMT

     [ https://issues.apache.org/jira/browse/SOLR-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Erik Hatcher updated SOLR-394:
------------------------------

    Description: 
There is an issue with the ruby response (and others too, perhaps json and python) when an
"integer" field is sent with leading zeros.   For example (from a report to ruby-dev@lucene),
the Solr response is:

 {'responseHeader'=>{'status'=>0,'QTime'=>1,'params'=>{'wt'=>'ruby','rows'=>'1','start'=>'5','q'=>'accounting','fl'=>'zip_code','qt'=>'standard'}},'response'=>{'numFound'=>15005,'start'=>5,'docs'=>[{'zip_code'=>[08817]}]}}

Which gives this error:

 solr/response/ruby.rb:30:in `initialize': invalid ruby code:
 (eval):1:in `initialize': compile error (Solr::Exception) (eval):1:
 Illegal octal digit

----

I had proposed prefixing all integer ruby output with '0d' which would do the trick nicely.
  Yonik, however, proposed simply stripping leading zeros for json and subclasses.  

  was:
There is an issue with the ruby response (and others too, perhaps json and python) when an
"integer" field is sent with leading zeros.   For example (from a report to ruby-dev@lucene),
the Solr response is:

 {'responseHeader'=>{'status'=>0,'QTime'=>1,'params'=>{'wt'=>'ruby','rows'=>'1','start'=>'5','q'=>'accounting','fl'=>'zip_code','qt'=>'standard'}},'response'=>{'numFound'=>15005,'start'=>5,'docs'=>[{'zip_code'=>[08817]}]}}

Which gives this error:
 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

----

I had proposed prefixing all integer ruby output with '0d' which would do the trick nicely.
  Yonik, however, proposed simply stripping leading zeros for json and subclasses.  


> Ruby response writer emits invalid integers for numbers stored with leading zeros
> ---------------------------------------------------------------------------------
>
>                 Key: SOLR-394
>                 URL: https://issues.apache.org/jira/browse/SOLR-394
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - ruby - flare
>            Reporter: Erik Hatcher
>            Assignee: Erik Hatcher
>
> There is an issue with the ruby response (and others too, perhaps json and python) when
an "integer" field is sent with leading zeros.   For example (from a report to ruby-dev@lucene),
the Solr response is:
>  {'responseHeader'=>{'status'=>0,'QTime'=>1,'params'=>{'wt'=>'ruby','rows'=>'1','start'=>'5','q'=>'accounting','fl'=>'zip_code','qt'=>'standard'}},'response'=>{'numFound'=>15005,'start'=>5,'docs'=>[{'zip_code'=>[08817]}]}}
> Which gives this error:
>  solr/response/ruby.rb:30:in `initialize': invalid ruby code:
>  (eval):1:in `initialize': compile error (Solr::Exception) (eval):1:
>  Illegal octal digit
> ----
> I had proposed prefixing all integer ruby output with '0d' which would do the trick nicely.
  Yonik, however, proposed simply stripping leading zeros for json and subclasses.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message