opensearch-project / opensearch-project/opensearch-java

[FEATURE] DocSort to have its own type

Open
#1,493 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
165
Forks
250
Avg merge
1d 18h
Merged PRs (30d)
26

Description

Is your feature request related to a problem?

There is no DocSort as of now. If you build a DocSort you are building a ScoreSort.

What solution would you like?

DocSort to have its own type.

What alternatives have you considered?

None

Do you have any additional context?

https://github.com/opensearch-project/opensearch-java/blob/eab40918d52a10a664bec1c2e488f3a6829d24a9/java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsBuilders.java#L50-L54

https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html

The sort is defined on a per field level, with special field name for _score to sort by score, and _doc to sort by index order.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in java-client/src/main/java/org/opensearch/client/opensearch/_types/SortOptionsBuilders.java, especially the existing ScoreSort-related definitions referenced by the issue. Compare the OpenSearch and Elasticsearch sort documentation, then determine the distinct DocSort type and its builder representation. Done means DocSort is represented separately from ScoreSort in the Java client.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.