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

Adrien Grand updated LUCENE-8015:
---------------------------------
    Attachment: LUCENE-8015-test.patch

Given that this bug is not easy to reproduce due to how we finally cast double 
scores to floats, which often returns the same value for consecutive values of 
freq, I tried to hack the test framework to compare the produced doubles (see 
attached patch - note this is for testing purpose only, I don't plan/want to 
merge it). My assumption is that if we can reproduce the issue with doubles, it 
means it can happen after a float cast as well, the scorer just needs to 
produce a value that is close enough from the boundary between two floats so 
that both values would round to different floats. And indeed tests fail 
systematically with this patch. The bad news is that I can't think of a way to 
fix the formula. Even if I put quite severe restrictions on the values that tfn 
may take, there are still some special freq values that manage to prove the 
score is not monotonic. Good news is that it doesn't make some other 
SimilarityBase impls fail like the axiomatic ones.

> TestBasicModelIne.testRandomScoring failure
> -------------------------------------------
>
>                 Key: LUCENE-8015
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8015
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>         Attachments: LUCENE-8015-test.patch, LUCENE-8015_test_fangs.patch
>
>
> reproduce with: ant test  -Dtestcase=TestBasicModelIne 
> -Dtests.method=testRandomScoring -Dtests.seed=86E85958B1183E93 
> -Dtests.slow=true -Dtests.locale=vi-VN -Dtests.timezone=Pacific/Tongatapu 
> -Dtests.asserts=true -Dtests.file.encoding=UTF8



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to