Sha256: d678717d12d8c2f1378583bd2d4f2f411bce8c62cf763257d25bcdc3b7ed0c87

Contents?: true

Size: 604 Bytes

Versions: 22

Compression:

Stored size: 604 Bytes

Contents

# frozen_string_literal: true

module Hyrax
  ##
  # Indexes visibility of the resource; Blacklight depends on visibility being
  # present in the index to determine visibility of results and object show
  # views.
  #
  # @example
  #   class MyIndexer < Hyrax::ValkyrieIndexer
  #     include Hyrax::VisibilityIndexer
  #   end
  module VisibilityIndexer
    def to_solr
      super.tap do |index_document|
        index_document[:visibility_ssi] = visibility_reader.read
      end
    end

    private

    def visibility_reader
      Hyrax::VisibilityReader.new(resource: resource)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hyrax-5.0.0.rc2 app/indexers/hyrax/visibility_indexer.rb
hyrax-5.0.0.rc1 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.6.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-4.0.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-4.0.0.rc3 app/indexers/hyrax/visibility_indexer.rb
hyrax-4.0.0.rc2 app/indexers/hyrax/visibility_indexer.rb
hyrax-4.0.0.rc1 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.5.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-4.0.0.beta2 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.4.2 app/indexers/hyrax/visibility_indexer.rb
hyrax-4.0.0.beta1 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.4.1 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.4.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.3.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.2.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.1.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.0.2 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.0.1 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.0.0 app/indexers/hyrax/visibility_indexer.rb
hyrax-3.0.0.pre.rc4 app/indexers/hyrax/visibility_indexer.rb