Skip to content

Add personalized ranking v2 recipe to personalize intelligent ranking… - #228

Merged
noCharger merged 1 commit into
opensearch-project:mainfrom
ivan-tse:feat-intelligent-ranking
Jun 21, 2024
Merged

Add personalized ranking v2 recipe to personalize intelligent ranking…#228
noCharger merged 1 commit into
opensearch-project:mainfrom
ivan-tse:feat-intelligent-ranking

Conversation

@ivan-tse

@ivan-tse ivan-tse commented Jun 5, 2024

Copy link
Copy Markdown
Contributor

Description

Adds PersonalizedRankingV2 recipe to personalize intelligent ranking plugin. Example of change when creating pipeline with the new recipe:
curl -X PUT "http://localhost:9200/_search/pipeline/intelligent_ranking" -u 'admin:admin' --insecure -H 'Content-Type: application/json' -d'
{
"description": "A pipeline to apply custom reranking",
"response_processors" : [
{
"personalized_search_ranking" : {
"campaign_arn" : "arn:aws:personalize:us-east-1:080258283992:campaign/opensearch-campaign",
"item_id_field" : "",
"recipe" : "aws-personalized-ranking-v2",
"weight" : "0.25",
"iam_role_arn": "",
"aws_region": "us-east-1"
}
}
]
}'

Testing

./gradlew build and tested locally by running above command

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as per the DCO using --signoff

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.

… plugin

Signed-off-by: Ivan Tse <tseiva@amazon.com>
Comment on lines +34 to +35
if (recipeInConfig.equals(AMAZON_PERSONALIZED_RANKING_RECIPE_NAME)
|| recipeInConfig.equals(AMAZON_PERSONALIZED_RANKING_V2_RECIPE_NAME)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: We can move this to a constant array.

@ivan-tse
ivan-tse marked this pull request as ready for review June 7, 2024 16:51
@noCharger
noCharger merged commit 603f265 into opensearch-project:main Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants