Sha256: 584d94b75bf5ab7b4f1589d2837056a6fb39cd1932e05d9fc9120970b1a883db
Contents?: true
Size: 661 Bytes
Versions: 8
Compression:
Stored size: 661 Bytes
Contents
module Sufia module Catalog extend ActiveSupport::Concern included do self.solr_search_params_logic += [:only_generic_files_and_collections] end protected # Limits search results just to GenericFiles and collections # @param solr_parameters the current solr parameters # @param user_parameters the current user-subitted parameters def only_generic_files_and_collections(solr_parameters, user_parameters) solr_parameters[:fq] ||= [] solr_parameters[:fq] << "#{Solrizer.solr_name("has_model", :symbol)}:(\"info:fedora/afmodel:GenericFile\" \"info:fedora/afmodel:Collection\")" end end end
Version data entries
8 entries across 8 versions & 1 rubygems