lib/blacklight/search_builder.rb in blacklight-7.29.0 vs lib/blacklight/search_builder.rb in blacklight-7.30.0
- old
+ new
@@ -43,9 +43,12 @@
self
end
##
# Update the :q (query) parameter
+ # @param [Hash<Symbol,Object>] conditions the field and values to query on
+ # @example
+ # search_builder.where(id: [1,2,3]) # produces: q:"{!lucene}id:(1 OR 2 OR 3)"
def where(conditions)
Deprecation.warn(Blacklight::SearchBuilder, "SearchBuilder#where must be called with a hash, received #{conditions.inspect}.") unless conditions.is_a? Hash
params_will_change!
@search_state = @search_state.reset(@search_state.params.merge(q: conditions))
@blacklight_params = @search_state.params