Class: Skala::PrimoAdapter::Search::RequestTransformation::ToggleBoolOperator

Inherits:
Transformator::Transformation::Step
  • Object
show all
Defined in:
lib/skala/primo_adapter/search/request_transformation/toggle_bool_operator.rb

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
# File 'lib/skala/primo_adapter/search/request_transformation/toggle_bool_operator.rb', line 7

def call
  if source.queries.present? && source.queries.all? { |_query| _query.type.to_sym == :ids }
    bool_opeator_node = transformation.inner_search_request.locate("PrimoSearchRequest/QueryTerms/BoolOpeator").first
    bool_opeator_node.nodes.clear << "OR"
  end
end