[ https://issues.apache.org/jira/browse/LUCENE-2541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-2541: ---------------------------------- Attachment: LUCENE-2541-uwe- BigDecimal.patch Here again the BigDecimal patch with additional tests. When writing the tests, I verified, that also Yoniks patch works correct, although it looks more "hackish". The Bigdecimal approach looks in my eyes much better, the overhead is neglectible (the range split is in no inner loop and object creation is minimized by precalculated 1<<shifts and corresponding masks. This makes the code look much more easy (and its also more easy to understand ant all - I also added more comments). I also added a test for these extreme values and also to verify that the range split works as exspected (maybe also check shift values vor each bound by also adding to list - will post updated patch later). The problem happens when the following is true: - the range contains a minimum bound that is > (MAX_VALUE - 1L<<precisionStep) - the range contains a maximum bound that is < (MIN_VALUE + 1L<<precisionStep) This affects dates not really and also for doubles its only happening for values near +/-infinity when the lower bound is close to the +infinity or the upper bound is close to -infinity. The same for longs (as noted before). > NumericRangeQuery errors with endpoints near long min and max values > -------------------------------------------------------------------- > > Key: LUCENE-2541 > URL: https://issues.apache.org/jira/browse/LUCENE-2541 > Project: Lucene - Java > Issue Type: Bug > Components: Search > Affects Versions: 2.9 > Reporter: Koji Sekiguchi > Assignee: Uwe Schindler > Attachments: LUCENE-2541-uwe- BigDecimal.patch, > LUCENE-2541-uwe.patch, LUCENE-2541-uwe.patch, LUCENE-2541.patch, > LUCENE-2541.patch, TestNumericRangeQuery.java > > > This problem first reported in Solr: > http://lucene.472066.n3.nabble.com/range-query-on-TrieLongField-strange-result-tt970974.html#a970974 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org