You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2014/02/24 15:09:20 UTC

[jira] [Updated] (LUCENE-5469) Add small rounding to FuzzyQuery.floatToEdits

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

Tim Allison updated LUCENE-5469:
--------------------------------

    Attachment: LUCENE-5469.patch

Fix with tests.  Chose to add .01f as hack.  Do we want genuine rounding?

> Add small rounding to FuzzyQuery.floatToEdits
> ---------------------------------------------
>
>                 Key: LUCENE-5469
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5469
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 5.0
>            Reporter: Tim Allison
>            Priority: Trivial
>              Labels: easyfix
>         Attachments: LUCENE-5469.patch
>
>
> I realize that FuzzyQuery.floatToEdits is deprecated, but I'd like to make a small fix for posterity.  Because of floating point issues, if a percentage leads to a number that is very close to a whole number of edits, our cast to int can improperly cause misses.
> ddddd~0.8  will not match "ddddX"
> eeeee~0.8 will not match "eeee" or "eeeeee"



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org