spring-projects / spring-projects/spring-ai
OpenSearch changed cosine similarity score in 2.19
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
I guess this is just a heads-up, because I spend a couple hours searching before I found the cause.
OpenSearch changed the formula to calculate cosine similarity in version 2.19, apparently they didn't realize this was a breaking change when you use minScore.
https://github.com/opensearch-project/k-NN/pull/2357
https://github.com/opensearch-project/k-NN/issues/2561
So, as of 2.19 it's not required anymore to add a 0.5 boost to the script_score query...
Not sure if it's the same for 3.x... sadly I'm stuck on 2.x, because of the infra guys :)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked OpenSearch k-NN pull request #2357 and issue #2561 first, then search spring-ai for OpenSearch script_score and minScore handling. The report names no target file, test, or requested change; clarify whether compatibility changes or documentation are wanted before starting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100