[ https://issues.apache.org/jira/browse/SOLR-449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12555743#action_12555743 ]
Mike Klaas commented on SOLR-449: --------------------------------- I don't think that declaring a viable approach. At least in python, it would create a series of statements rather than a single expression, which would make parsing more difficult (using exec instead of eval(), etc). Ruby might behave similarly. I'm not sure that repeating the computation is a justifiable worry though: even floating point division is blazingly fast compared to anything ruby will try to do. Also, I'm not sure if it is possible to store a NaN or infinity in a document field, is it? I'm too lazy to check if Float.parseFloat("NaN") does the right thing in java. It came up for me because of a bug in a custom queryscorer that gamely attempted a division by zero. I've checked in a the fix that we discussed for python and ruby--I'll leave the issue open in case our resident rubyista has a better solution. > python (and presumably ruby) writer can generate NaN > ---------------------------------------------------- > > Key: SOLR-449 > URL: https://issues.apache.org/jira/browse/SOLR-449 > Project: Solr > Issue Type: Bug > Affects Versions: 1.3 > Reporter: Mike Klaas > Assignee: Mike Klaas > Priority: Trivial > Attachments: nan.patch > > > The JSON response writer can omit "NaN" as float literal; this is fine for > JSON but breaks eval() in python (not sure if this is a problem in ruby). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.