[jira] [Commented] (LUCENE-8343) BlendedInfixSuggester bad score calculus for certain suggestion weights

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] [Commented] (LUCENE-8343) BlendedInfixSuggester bad score calculus for certain suggestion weights

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/LUCENE-8343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16510863#comment-16510863 ]

Alessandro Benedetti commented on LUCENE-8343:

Hi [~mikemccand], thank you for your feedback!
I definitely agree the path with data type migration is the best route to solve the bug(s) elegantly.
I already attached a Pull Request : 

Which :
- move the weight long to Long ( preserving null values with difference to 0 values)
- move the suggestion score to double ( preserving the precision)

It is ready for review and after a first feedback I can work more on that to make it production ready!

> BlendedInfixSuggester bad score calculus for certain suggestion weights
> -----------------------------------------------------------------------
>                 Key: LUCENE-8343
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8343
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 7.3.1
>            Reporter: Alessandro Benedetti
>            Priority: Major
>         Attachments: LUCENE-8343.patch, LUCENE-8343.patch, LUCENE-8343.patch
>          Time Spent: 20m
>  Remaining Estimate: 0h
> Currently the BlendedInfixSuggester return a (long) score to rank the suggestions.
> This score is calculated as a multiplication between :
> long *Weight* : the suggestion weight, coming from a document field, it can be any long value ( including 1, 0,.. )
> double *Coefficient* : 0<=x<=1, calculated based on the position match, earlier the better
> The resulting score is a long, which means that at the moment, any weight<10 can bring inconsistencies.
> *Edge cases* 
> Weight =1
> Score = 1( if we have a match at the beginning of the suggestion) or 0 ( for any other match)
> Weight =0
> Score = 0 ( independently of the position match coefficient)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]