opensearch-project / opensearch-project/opensearch-java
[BUG] ScoreSort returns SortOptions.Kind.Doc
Open
Nobody has claimed this yet.
bug
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
What is the bug?
When creating a ScoreSort it ends up behaving as _doc sort because the kind of ScoreSort is SortOptions.Kind.Doc
How can one reproduce the bug?
SortOptionsBuilders.score().build()._sortOptionsKind() // == _doc
What is the expected behavior?
SortOptionsBuilders.score().build()._sortOptionsKind() // == _score
What is your host/environment?
Windows 10
Do you have any screenshots?
Do you have any additional context?
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
Open java-client/src/main/java/org/opensearch/client/opensearch/_types/ScoreSort.java around lines 69-72 and inspect how ScoreSort reports its sort kind. Reproduce the issue with SortOptionsBuilders.score().build()._sortOptionsKind(); done means it returns _score rather than _doc.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100