Sha256: 2b91b2329b060187310f4f1f7624a8a734d16d8a99d2d37e8316410b7174ccf4

Contents?: true

Size: 763 Bytes

Versions: 3

Compression:

Stored size: 763 Bytes

Contents

require "celsius/transformation/step"
require "ox"

class Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchRequestTransformation::
  ProcessRangeQueries < Celsius::Transformation::Step

  def call
    if range_queries = Celsius::Hash.deep_find_key(source, :range)
      binding.pry
    end
  end

=begin
  process "//range" do |range|
    index_field = index_field_mapping(range.nodes.first.value)

    find(@search_request, "PrimoSearchRequest/QueryTerms") << element_from_xml(
      <<-xml
        <QueryTerm>
          <IndexField>#{index_field}</IndexField>
          <PrecisionOperator>contains</PrecisionOperator>
          <Value>[#{find(range, "/gte").text} TO #{find(range, "/lte").text}]</Value>
        </QueryTerm>
      xml
    )
  end
=end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
celsius-primo-0.1.2 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/process_range_queries.rb
celsius-primo-0.1.1 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/process_range_queries.rb
celsius-primo-0.1.0 lib/celsius/primo/soap_api/searcher/search_brief/search_request_transformation/process_range_queries.rb