Skip to content

[BUG] #1093

@fxieatlassian

Description

@fxieatlassian

What is the bug?
A clear and concise description of the bug.
It looks like this is a bug in the LTR plugin, leading to bad request of params is empty because it's required but doesn't serialise if it is empty. opensearch-learning-to-rank-base/src/main/java/com/o19s/es/ltr/query/StoredLtrQueryBuilder.java at main · opensearch-project/opensearch-learning-to-rank-base makes the params mandatory but opensearch-learning-to-rank-base/src/main/java/com/o19s/es/ltr/query/StoredLtrQueryBuilder.java at main · opensearch-project/opensearch-learning-to-rank-base doesn’t serialize params if they are empty or null.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. send a search request with filter and sltr block, but empty map for the params
  2. opensearch will return a bad request

What is the expected behavior?
the expected behaviour is a normal search request, it should return a 200 OK.

What is your host/environment?

  • OS: Java
  • Version: 2
  • Plugins: LTR

Do you have any screenshots?

Image

Image

Do you have any additional context?
Add any other context about the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions