lib/elastic_search/query_builder.rb in elasticsearch-query-builder-0.6.2 vs lib/elastic_search/query_builder.rb in elasticsearch-query-builder-0.6.3
- old
+ new
@@ -31,24 +31,25 @@
add_clause(internal_path, body)
self
end
end
- def initialize(opts: {}, mopts: [], client: nil, function_score: false)
+ def initialize(opts: {}, mopts: [], client: nil, function_score: false, options: {})
@opts = opts
@mopts = mopts
@function_score = function_score
@client = client
+ @options = options
end
def to_json(*_args)
@opts.to_h
end
def results
raise 'client: should be set in order to fetch results' unless client
- client&.search(opts)&.results
+ client&.search(opts, options: options)&.results
end
def multisearch_results
raise 'client: should be set in order to fetch multisearch_results' unless client