You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2007/11/29 03:36:43 UTC
[jira] Commented: (SOLR-424) The ruby output type produces
incorrect output for numeric types without a value
[ https://issues.apache.org/jira/browse/SOLR-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546539 ]
Yonik Seeley commented on SOLR-424:
-----------------------------------
I believe the underlying issue is that there isn't validation during indexing.
An empty string is not a valid number... if you wish to leave the number out of that document, then leave it entirely out.
For a legacy lucene index, I think a zero length integer field should map to 0, not null (which is not an integer).
> The ruby output type produces incorrect output for numeric types without a value
> --------------------------------------------------------------------------------
>
> Key: SOLR-424
> URL: https://issues.apache.org/jira/browse/SOLR-424
> Project: Solr
> Issue Type: Bug
> Components: clients - ruby - flare
> Affects Versions: 1.1.0, 1.2, 1.3
> Reporter: Kurt Schrader
> Priority: Critical
> Fix For: 1.3
>
> Attachments: fix_ruby_output.patch
>
>
> When parsing the Ruby output returned from Solr, if a numerical value has no value in the index, it causes an invalid Ruby hash to be returned. For instance:
> {code:xml}
> 'response'=>{'numFound'=>1,'start'=>0,'maxScore'=>4.951244,'docs'=>[
> {
> 'subclass_t'=>'Protocol',
> 'pk_i'=>1,
> 'id'=>'Protocol:1',
> 'name_t'=>'Falcipain IC50',
> 'group_id_i'=>,
> 'score'=>4.951244}]
> }}
> {code}
> is not a valid hash because 'group_id_i' does not resolve to anything. It should resolve to nil:
> {code:xml}
> 'response'=>{'numFound'=>1,'start'=>0,'maxScore'=>4.951244,'docs'=>[
> {
> 'subclass_t'=>'Protocol',
> 'pk_i'=>1,
> 'id'=>'Protocol:1',
> 'name_t'=>'Falcipain IC50',
> 'group_id_i'=>nil,
> 'score'=>4.951244}]
> }}
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.