Sha256: 94793c1f418f72a74449c2eab7a0a4ee3e76a480f7ed81562d7b359cd9affef1

Contents?: true

Size: 613 Bytes

Versions: 10

Compression:

Stored size: 613 Bytes

Contents

module AgnosticBackend
  module Queryable
    module Cloudsearch
      class ResultSet < AgnosticBackend::Queryable::ResultSet
        include AgnosticBackend::Utilities

        def total_count
          raw_results.hits.found
        end

        def scroll_cursor
          raw_results.hits.cursor
        end

        private

        def filtered_results
          raw_results.hits.hit.map(&:fields)
        end

        def transform(result)
          transform_nested_values(unflatten(result), Proc.new{|value| value.size > 1 ? value.split.join('|') : value.first})
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
agnostic_backend-1.0.4 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-1.0.3 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-1.0.2 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-1.0.1 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-1.0.0 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-0.9.9 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-0.9.8 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-0.9.4 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-0.9.3 lib/agnostic_backend/queryable/cloudsearch/result_set.rb
agnostic_backend-0.9.2 lib/agnostic_backend/queryable/cloudsearch/result_set.rb