Skip to content

Add Search APIs for Search Relevance#1064

Open
ajleong623 wants to merge 11 commits intoopensearch-project:mainfrom
ajleong623:search_relevance_search_api
Open

Add Search APIs for Search Relevance#1064
ajleong623 wants to merge 11 commits intoopensearch-project:mainfrom
ajleong623:search_relevance_search_api

Conversation

@ajleong623
Copy link
Copy Markdown
Contributor

Description

This change adds the recently-created search apis for the search relevance repository. These include:

  • /_plugins/_search-relevance/search_configurations/_search
  • /_plugins/_search-relevance/experiments/_search
  • /_plugins/_search-relevance/query_sets/_search
  • /_plugins/_search-relevance/judgments/_search

These give more flexibility in searching through the objects needed for search relevance. The issue and linked PRs are here: opensearch-project/search-relevance#351

Issues Resolved

N/A

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

Proto Compatibility Report

Merge Report

No changes detected.


Generated by Proto Compatibility Check

Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
@ajleong623 ajleong623 marked this pull request as ready for review March 4, 2026 05:59
@ajleong623 ajleong623 marked this pull request as draft March 4, 2026 06:00
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 4, 2026

Changes Analysis

Commit SHA: 46083bd
Comparing To SHA: fd80768

API Changes

Summary

├─┬Paths
│ ├──[➕] _search (8231:3)
│ ├──[➕] _search (8405:3)
│ ├──[➕] _search (8089:3)
│ └──[➕] _search (8326:3)
└─┬Components
  ├──[➕] requestBodies/search_relevance.query_sets_search (33030:7)
  ├──[➕] requestBodies/search_relevance.experiments_search (32965:7)
  ├──[➕] requestBodies/search_relevance.search_configurations_search (33045:7)
  ├──[➕] requestBodies/search_relevance.judgments_search (32979:7)
  ├──[➕] responses/search_relevance.search_configurations_search___200 (37402:7)
  ├──[➕] responses/search_relevance.judgments_search___200 (37354:7)
  ├──[➕] responses/search_relevance.query_sets_search___200 (37396:7)
  ├──[➕] responses/search_relevance.experiments_search___200 (37280:7)
  └─┬Schemas
    └─┬search_relevance._common___PutSearchConfigurationRequest
      └──[➕] properties/description (69193:9)

Document Element Total Changes Breaking Changes
paths 4 0
components 9 0
  • Total Changes: 13
  • Additions: 13

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/23570134827/artifacts/6113628079

API Coverage

Before After Δ
Covered (%) 666 (65.23 %) 666 (65.23 %) 0 (0 %)
Uncovered (%) 355 (34.77 %) 355 (34.77 %) 0 (0 %)
Unknown 149 153 4

Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
@ajleong623
Copy link
Copy Markdown
Contributor Author

I am not 100% sure if the api specs should be added with the version of OpenSearch that is being pushed or after the version has been pushed. I am also working on passing tests before I switch to "ready for review".

Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
@ajleong623
Copy link
Copy Markdown
Contributor Author

When adding the tests, I added the new apis as a new synopsis to test files that were already there. However, the version of OpenSearch where those initial tests were created was 3.1. However, the new apis are added for 3.5. Therefore, I put the version assertion of >=3.5 on those files. Was this the preferred way of handling the testing or is there a better strategy?

@epugh
Copy link
Copy Markdown
Contributor

epugh commented Mar 4, 2026

Just wanted to share that we are actively using these annotations in the opensearch-mcp-server-py repo to generate tools, very exciting.

Here is an example: opensearch-project/opensearch-mcp-server-py#187

When this goes in, we'll push for another release of the opensearch-py client, which will in turn expose these APIs!

Copy link
Copy Markdown
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dropped in a few questions...

operationId: search_relevance.post_search_configurations.1
x-operation-group: search_relevance.post_search_configurations
x-version-added: '3.5'
description: Searches for search configurations.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funny, yet accurate wording ;-)

size:
type: integer
format: int64
description: The number of tasks to return.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? tasks? or queries?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be queries. Thank you.

size:
type: integer
format: int64
description: The number of tasks to return.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question on the descirption as above..

size:
type: integer
format: int64
description: The number of tasks to return.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe it's a more generic "number of items to return" across all of these?

Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
@ajleong623 ajleong623 marked this pull request as ready for review March 10, 2026 20:13
@epugh
Copy link
Copy Markdown
Contributor

epugh commented Mar 19, 2026

Hi all, this PR has been sitting for a while, and we want to get it in for 3.6.. I'm pinging recently active maintainers ;-). @harshavamsi @lucy66hw for some help!

Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
Signed-off-by: Anthony Leong <aj.leong623@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants