Sha256: 73514ff02d5cdf304fe947cbd0aa76d3b124d9a38b53cd19d790adeb5b6af705

Contents?: true

Size: 535 Bytes

Versions: 33

Compression:

Stored size: 535 Bytes

Contents

module SolrDocHelper
  def add_solr_value(solr_doc, field_name, value, field_type = :default, index_types = [:searchable])
    if Solrizer::VERSION > '3'
      case field_type
        when :symbol
          index_types << field_type
      end
      ::Solrizer.insert_field(solr_doc, field_name, value, *index_types)
    else
      index_types.each { |index_type|
        ::Solrizer::Extractor.insert_solr_field_value(solr_doc, ::ActiveFedora::SolrService.solr_name(field_name, field_type, index_type), value)
      }
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
dor-services-5.15.1 lib/dor/utils/solr_doc_helper.rb
dor-services-5.15.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.14.2 lib/dor/utils/solr_doc_helper.rb
dor-services-5.14.1 lib/dor/utils/solr_doc_helper.rb
dor-services-5.14.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.13.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.12.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.11.1 lib/dor/utils/solr_doc_helper.rb
dor-services-5.11.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.10.4 lib/dor/utils/solr_doc_helper.rb
dor-services-5.10.3 lib/dor/utils/solr_doc_helper.rb
dor-services-5.10.2 lib/dor/utils/solr_doc_helper.rb
dor-services-5.10.1 lib/dor/utils/solr_doc_helper.rb
dor-services-5.10.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.9.1 lib/dor/utils/solr_doc_helper.rb
dor-services-5.9.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.8.2 lib/dor/utils/solr_doc_helper.rb
dor-services-5.8.1 lib/dor/utils/solr_doc_helper.rb
dor-services-5.8.0 lib/dor/utils/solr_doc_helper.rb
dor-services-5.7.0 lib/dor/utils/solr_doc_helper.rb