Skip to content

[BUG] Learning to Rank plugin experiment error #255

@terry-yang-sh

Description

@terry-yang-sh

What is the bug?

Search configuration containing learning to rank plugin query, such as rescore_query causes experiment to fail with error: [1:97] [query] failed to parse field [rescore_query]

How can one reproduce the bug?

Create a feature store or model using the opensearch learning to rank plugin. Create a search configuration containing a learning to rank query such as rescore_query. Create an experiment using the search configuration. The experiment will fail with an error.

What is the expected behavior?

The experiment should succeed.

What is your host/environment?

Amazon OpenSearch 3.1

Do you have any screenshots?

{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": ".plugins-search-relevance-experiment",
        "_id": "88be930a-ddc9-4caf-a4a7-6b757b7be4f1",
        "_score": 1,
        "_source": {
          "id": "88be930a-ddc9-4caf-a4a7-6b757b7be4f1",
          "timestamp": "2025-10-06T22:47:42.782Z",
          "type": "PAIRWISE_COMPARISON",
          "status": "ERROR",
          "querySetId": "db21ec2d-fcb2-4ad0-bf50-bd619185da6f",
          "searchConfigurationList": [
            "2de8fcd0-05c6-4e29-a450-b30becfbd614",
            "98a27efa-ae94-4e44-92a1-827ecd341d63"
          ],
          "judgmentList": [],
          "size": 10,
          "results": [
            {
              "error": "[1:97] [query] failed to parse field [rescore_query]"
            }
          ]
        }
      }
    ]
  }
}

Do you have any additional context?

Learning to rank query works in single query comparison and "Validate Search Configuration" when creating the search configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions