lib/blacklight/search_builder.rb in blacklight-5.14.0 vs lib/blacklight/search_builder.rb in blacklight-5.15.0
- old
+ new
@@ -55,9 +55,30 @@
builder
end
##
+ # Converse to append, remove processor chain directives,
+ # returning a new builder that's a copy of receiver with
+ # specified change.
+ #
+ # Methods in argument that aren't currently in processor
+ # chain are ignored as no-ops, rather than raising.
+ def except *except_processor_chain
+ builder = self.class.new(processor_chain - except_processor_chain, scope)
+ .with(blacklight_params)
+ .merge(@merged_params)
+ .reverse_merge(@reverse_merged_params)
+
+ builder.start(@start) if @start
+ builder.rows(@rows) if @rows
+ builder.page(@page) if @page
+ builder.facet(@facet) if @facet
+
+ builder
+ end
+
+ ##
# Merge additional, repository-specific parameters
def merge extra_params, &block
if extra_params
params_will_change!
@merged_params.merge!(extra_params.to_hash, &block)