From e1aa0f00dd6f389284b0997c03c445c9cca2a378 Mon Sep 17 00:00:00 2001 From: Mohamad Denno Date: Thu, 18 Aug 2022 19:35:34 +0200 Subject: [PATCH] Adding missing runtime_mappings word to the search --- lib/elasticsearch/dsl/search/options.rb | 3 ++- test/unit/search_options_test.rb | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/elasticsearch/dsl/search/options.rb b/lib/elasticsearch/dsl/search/options.rb index d3ca637..b148474 100644 --- a/lib/elasticsearch/dsl/search/options.rb +++ b/lib/elasticsearch/dsl/search/options.rb @@ -35,7 +35,8 @@ class Options :indices_boost, :track_scores, :min_score, - :track_total_hits + :track_total_hits, + :runtime_mappings ] def initialize(*args, &block) diff --git a/test/unit/search_options_test.rb b/test/unit/search_options_test.rb index 3b07b6c..5d76d7c 100644 --- a/test/unit/search_options_test.rb +++ b/test/unit/search_options_test.rb @@ -57,6 +57,11 @@ class SearchOptionsTest < ::Elasticsearch::Test::UnitTestCase assert_equal( { script_fields: ['foo'] }, subject.to_hash ) end + should "encode runtime_mappings" do + subject.runtime_mappings ['foo'] + assert_equal( { runtime_mappings: ['foo'] }, subject.to_hash ) + end + should "encode fielddata_fields" do subject.fielddata_fields ['foo'] assert_equal( { fielddata_fields: ['foo'] }, subject.to_hash )