Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance test cases related to scoring due to lucene 10 upgrade #145

Open
jngz-es opened this issue Feb 21, 2025 · 0 comments
Open

Enhance test cases related to scoring due to lucene 10 upgrade #145

jngz-es opened this issue Feb 21, 2025 · 0 comments

Comments

@jngz-es
Copy link
Collaborator

jngz-es commented Feb 21, 2025

As we upgraded to lucene 10 recently. Some original test cases were broken by the new changes of scoring as https://issues.apache.org/jira/browse/LUCENE-8563.

A sample assert is like assertThat(sr.getHits().getAt(0).getScore(), Matchers.greaterThanOrEqualTo(29.0f)); from https://github.com/opensearch-project/opensearch-learning-to-rank-base/blob/main/src/javaRestTest/java/com/o19s/es/ltr/query/StoredLtrQueryIT.java#L121.

Basically the single absolute score as above 29.0f is not meaningful to test, the test case shouldn't depend on it, as we only care about ranking. We might construct a baseline, then compare with it to test. Otherwise, we could keep facing the same test failures in the future lucene scoring changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants