Skip to content

Add Search APIs for Search Relevance#1064

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

Add Search APIs for Search Relevance#1064
ajleong623 wants to merge 15 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: 4cf56a6
Comparing To SHA: 7a42f5b

API Changes

Summary

No changes found between specifications

Report

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

API Coverage

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

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...

Comment thread spec/namespaces/search_relevance.yaml Outdated
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 ;-)

Comment thread spec/namespaces/search_relevance.yaml Outdated
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.

Comment thread spec/namespaces/search_relevance.yaml Outdated
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..

Comment thread spec/namespaces/search_relevance.yaml Outdated
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>
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>
@epugh
Copy link
Copy Markdown
Contributor

epugh commented Apr 15, 2026

Thanks for poking away at this @ajleong623 ... Are the test failures related to ml-commons and replication plubings matter for this PR?

@ajleong623
Copy link
Copy Markdown
Contributor Author

@karenyrx I have tried running my initial pr, however, the test with just OpenSearch 2.0.0 failed. After commenting out all my changes, I still have version 2.0.0 failing. In fact a couple other test versions failed with the other api spec changes. Is there anything I am missing or is the failing test affecting other PRs in general?

@ajleong623
Copy link
Copy Markdown
Contributor Author

@epugh I think the errors are unrelated to the changes I made based on reading them.

@ajleong623
Copy link
Copy Markdown
Contributor Author

@Xtansia when my pr was up, all the tests passed except for OpenSearch version 2.0.0. Currently I commented all my changes out, and the test is still failing as well as a couple of unrelated ones. What could I do to have the pr merged?

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