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

[BUG] FieldSort not implement SortOptionsVariant #1089

Open
jbrun opened this issue Jul 17, 2024 · 1 comment
Open

[BUG] FieldSort not implement SortOptionsVariant #1089

jbrun opened this issue Jul 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jbrun
Copy link

jbrun commented Jul 17, 2024

What is the bug?

When we want to sort a request, FieldSort doesn’t implement SortOptionVariant, so we cannot use it in SearchRequest with SortOptionsBuilders

How can one reproduce the bug?

SearchRequest.Builder searchRequest = new SearchRequest.Builder() .sort(SortOptionsBuilders.field().field(“lastName”).order(SortOrder.Desc).build()._toSortOptions());

or

SearchRequest.Builder searchRequest = new SearchRequest.Builder() .sort(FieldSort.of(s → s.field(“lastName”).order(ortOrder.Desc))._toSortOptions());

._toSortOptions() not available

However ScoreSort, GeoDistanceSort and ScriptSort implement SortOptionVariant

What is the expected behavior?

package org.opensearch.client.opensearch._types;
public class FieldSort implements SortOptionsVariant, JsonpSerializable

What is your host/environment?

opensearch-java:2.10.4

@jbrun jbrun added bug Something isn't working untriaged labels Jul 17, 2024
@dblock
Copy link
Member

dblock commented Aug 5, 2024

[Catch All Triage - 1, 2, 3]

@dblock dblock removed the untriaged label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants