From 368c69b5b1a9b9fd85e81dafc635becee0507905 Mon Sep 17 00:00:00 2001 From: Kim Quang Cap Date: Fri, 5 Jul 2024 09:45:05 +0700 Subject: [PATCH] Fixed example description and added changelog Signed-off-by: Kim Quang Cap --- CHANGELOG.md | 1 + lib/opensearch/dsl/search/queries/script_score.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14aa2b874..f9b83ef65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] ### Added +- Added `script_score` to Query DSL ([#254](https://github.com/opensearch-project/opensearch-ruby/pull/254)) ### Changed ### Deprecated ### Removed diff --git a/lib/opensearch/dsl/search/queries/script_score.rb b/lib/opensearch/dsl/search/queries/script_score.rb index bf34911e9..9c7228059 100644 --- a/lib/opensearch/dsl/search/queries/script_score.rb +++ b/lib/opensearch/dsl/search/queries/script_score.rb @@ -28,7 +28,7 @@ module OpenSearch module DSL module Search module Queries - # A query which wraps another query and returns a customize score for matching documents + # A query which wraps another query and returns a customized score for matching documents # # @example # @@ -39,7 +39,7 @@ module Queries # match content: 'Twitter' # end # - # script source: "_score * params['multiplier']" + # script source: "_score * params['multiplier']", # params: { multiplier: 2.0 } # end # end