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

Search pipelines added #172

Merged
merged 9 commits into from
Mar 24, 2024
Merged

Conversation

Tokesh
Copy link
Collaborator

@Tokesh Tokesh commented Dec 30, 2023

Description

Adding Search Pipelines specs

Issues Resolved

[#171]

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.

@nhtruong
Copy link
Collaborator

nhtruong commented Jan 2, 2024

This one is only concerned with Creating and Retrieving a search pipeline, correct?
Looks like we also need to update the search endpoint to support the search_pipeline querystring parameter as well.
There's also an endpoint to retrieve pipeline stats.

You can add those in another PR.

Also maybe we should put these endpoints in the search_pipeline namespace? (the operation groups will then be search_pipeline.create, search_pipeline.get, search_pipeline.metrics... and move the files under ./search_pipeline folder)

@Tokesh
Copy link
Collaborator Author

Tokesh commented Jan 3, 2024

Looks like we also need to update the search endpoint to support the search_pipeline querystring parameter as well.
There's also an endpoint to retrieve pipeline stats.

Yeap, I need some more time to do it (I hope this weekends). I'll create another PR

Also maybe we should put these endpoints in the search_pipeline namespace? (the operation groups will then be search_pipeline.create, search_pipeline.get, search_pipeline.metrics... and move the files under ./search_pipeline folder)

Yes, good idea! You can check it now

@Tokesh Tokesh requested a review from nhtruong January 9, 2024 04:25
nhtruong
nhtruong previously approved these changes Jan 10, 2024
model/search_pipeline/get/operations.smithy Show resolved Hide resolved
model/search_pipeline/get/structures.smithy Outdated Show resolved Hide resolved
Comment on lines 25 to 34
structure RequestProcessors {
filter_query: FilterQuery,
neural_query_enricher: NeuralQueryEnricher,
script: SearchScript
}

structure ResponseProcessors {
personalize_search_ranking: PersonalizeSearchRanking,
rename_field: RenameField,
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Really these are more like unions rather than structures, but not sure how the OpenAPI conversion handles unions.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Union will become oneOf in OpenAPI

Copy link
Collaborator Author

@Tokesh Tokesh Feb 8, 2024

Choose a reason for hiding this comment

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

I never used unions. Do i need to implement it here?

structure SearchPipelineStructure{
version: Integer,
request_processors: RequestProcessorsList,
response_processors: ResponseProcessorsList
Copy link
Collaborator

Choose a reason for hiding this comment

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

@dblock
Copy link
Member

dblock commented Jan 19, 2024

Are we supposed to be adding tests as well?

@nhtruong
Copy link
Collaborator

nhtruong commented Jan 22, 2024

@dblock The current test framework for this repo is extremely labor intensive for very little benefits. We need a more streamlined framework to avoid discoursing people from contributing to this project.

I also discussed with others earlier today on this topics. @Xtansia has a proposal for the new test framework that he will describe in a new issue. We also discussed testing the specs through the generated clients. And eventually (hopefully not too far into the future), the Specs should be the point of origin of for every new feature, and the cluster should be tested against the Specs, not the other way around.

@dblock
Copy link
Member

dblock commented Feb 7, 2024

@Tokesh looks like there are a few questions/issues above, care to address/resolve? Thanks.

@Tokesh
Copy link
Collaborator Author

Tokesh commented Feb 7, 2024

@Tokesh looks like there are a few questions/issues above, care to address/resolve? Thanks.

I was busy restoring my health, was a little distracted and didn’t notice how I was blocking the rest of the PR. I'm sorry!
Fixed the errors mentioned above
It’s better now, ready to correct any mistakes if needed.

@dblock
Copy link
Member

dblock commented Feb 7, 2024

@Xtansia @nhtruong all yours!

@saimedhi
Copy link
Contributor

@nhtruong, @Xtansia, could you kindly review this PR? There's been interest from users regarding the search pipeline API in OpenSearch-py. Relevant issues: #668, #474.

Co-authored-by: Thomas Farr <[email protected]>
Signed-off-by: Niyazbek Torekeldi <[email protected]>
@Tokesh Tokesh requested a review from Xtansia March 16, 2024 14:32
Copy link
Collaborator

@Xtansia Xtansia left a comment

Choose a reason for hiding this comment

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

@Tokesh Thanks for making those changes, please just run ./gradlew spotlessApply to fix formatting, and also rebase your branch onto the latest main so that the API Coverage workflow can pass

Copy link
Contributor

API specs implemented for 241/649 (37%) APIs.

2 similar comments
Copy link
Contributor

API specs implemented for 241/649 (37%) APIs.

Copy link
Contributor

API specs implemented for 241/649 (37%) APIs.

Signed-off-by: Niyazbek Torekeldi <[email protected]>
@Tokesh Tokesh force-pushed the search-pipelines branch from 5ad74c4 to 1a901cd Compare March 22, 2024 18:47
Copy link
Contributor

API specs implemented for 241/649 (37%) APIs.

@Tokesh Tokesh requested a review from Xtansia March 22, 2024 18:49
@Tokesh
Copy link
Collaborator Author

Tokesh commented Mar 22, 2024

@Tokesh Thanks for making those changes, please just run ./gradlew spotlessApply to fix formatting, and also rebase your branch onto the latest main so that the API Coverage workflow can pass

I got this! you can check it now

@Xtansia Xtansia merged commit 4ef4b7d into opensearch-project:main Mar 24, 2024
5 checks passed
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.

5 participants