File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
lib/elasticsearch/dsl/search Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ class Options
2121 :version ,
2222 :indices_boost ,
2323 :track_scores ,
24- :min_score
24+ :min_score ,
25+ :track_total_hits
2526 ]
2627
2728 def initialize ( *args , &block )
Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ class SearchOptionsTest < ::Elasticsearch::Test::UnitTestCase
6464 assert_equal ( { version : true } , subject . to_hash )
6565 end
6666
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+
6775 should "encode indices_boost" do
6876 subject . indices_boost foo : 'bar'
6977 assert_equal ( { indices_boost : { foo : 'bar' } } , subject . to_hash )
You can’t perform that action at this time.
0 commit comments