Sha256: 6f960bc3905aa96685d04b94129bd1b894197229315736c5ded7500061121ba1

Contents?: true

Size: 613 Bytes

Versions: 17

Compression:

Stored size: 613 Bytes

Contents

module Geoblacklight
  module Relation
    class Descendants
      def initialize(id, repository)
        @search_id = id
        @repository = repository
      end

      def create_search_params
        { fq: "#{Settings.FIELDS.SOURCE}:#{@search_id}",
          fl: [Settings.FIELDS.TITLE, 'layer_slug_s'] }
      end

      def execute_query
        @repository.connection.send_and_receive(
          @repository.blacklight_config.solr_path,
          params: create_search_params
        )
      end

      def results
        response = execute_query
        response['response']
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
geoblacklight-2.3.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-2.2.1 lib/geoblacklight/relation/descendants.rb
geoblacklight-2.2.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-2.1.2 lib/geoblacklight/relation/descendants.rb
geoblacklight-2.1.1 lib/geoblacklight/relation/descendants.rb
geoblacklight-2.1.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-2.0.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.9.1 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.9.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.8.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.7.1 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.7.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.6.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.5.1 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.5.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.4.0 lib/geoblacklight/relation/descendants.rb
geoblacklight-1.3.0 lib/geoblacklight/relation/descendants.rb