File tree 2 files changed +10
-1
lines changed
lib/elasticsearch/dsl/search
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ class Options
21
21
:version ,
22
22
:indices_boost ,
23
23
:track_scores ,
24
- :min_score
24
+ :min_score ,
25
+ :track_total_hits
25
26
]
26
27
27
28
def initialize ( *args , &block )
Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ class SearchOptionsTest < ::Elasticsearch::Test::UnitTestCase
64
64
assert_equal ( { version : true } , subject . to_hash )
65
65
end
66
66
67
+ should "encode track_total_hits" do
68
+ subject . track_total_hits 123
69
+ assert_equal ( { track_total_hits : 123 } , subject . to_hash )
70
+
71
+ subject . track_total_hits true
72
+ assert_equal ( { track_total_hits : true } , subject . to_hash )
73
+ end
74
+
67
75
should "encode indices_boost" do
68
76
subject . indices_boost foo : 'bar'
69
77
assert_equal ( { indices_boost : { foo : 'bar' } } , subject . to_hash )
You can’t perform that action at this time.
0 commit comments