Skip to content

Commit

Permalink
Stop indexing on active_fedora_model_ssi
Browse files Browse the repository at this point in the history
We are using has_model_ssim for this capability
  • Loading branch information
jcoyne committed May 31, 2016
1 parent b738724 commit 5a2b3a7
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion lib/active_fedora/indexing_service.rb
Expand Up @@ -38,7 +38,6 @@ def generate_solr_document
solr_doc = {}
Solrizer.set_field(solr_doc, 'system_create', c_time, :stored_sortable)
Solrizer.set_field(solr_doc, 'system_modified', m_time, :stored_sortable)
Solrizer.set_field(solr_doc, 'active_fedora_model', object.class.inspect, :stored_sortable)
solr_doc[QueryResultBuilder::HAS_MODEL_SOLR_FIELD] = object.has_model
solr_doc[ActiveFedora.id_field.to_sym] = object.id
solr_doc[self.class.profile_solr_name] = profile_service.new(object).export
Expand Down
Expand Up @@ -102,7 +102,6 @@
-->
<str name="qf">
id
active_fedora_model_ssi
title_tesim
author_tesim
subject_tesim
Expand Down
1 change: 0 additions & 1 deletion solr/config/solrconfig.xml
Expand Up @@ -102,7 +102,6 @@
-->
<str name="qf">
id
active_fedora_model_ssi
title_tesim
author_tesim
subject_tesim
Expand Down
4 changes: 0 additions & 4 deletions spec/unit/indexing_spec.rb
Expand Up @@ -71,10 +71,6 @@ class SpecNode < ActiveFedora::Base
expect(solr_doc[:id]).to eql("changeme:123")
end

it "adds self.class as the :active_fedora_model" do
expect(subject[ActiveFedora.index_field_mapper.solr_name("active_fedora_model", :stored_sortable)]).to eql "SpecNode"
end

context "with attached files" do
let(:mock1) { double("ds1") }
let(:mock2) { double("ds2") }
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/query_spec.rb
Expand Up @@ -95,11 +95,11 @@ class Basic < ActiveFedora::Base
end

it "queries for empty strings" do
expect(SpecModel::Basic.where(active_fedora_model_ssi: '').count).to eq 0
expect(SpecModel::Basic.where(has_model_ssim: '').count).to eq 0
end

it 'queries for empty arrays' do
expect(SpecModel::Basic.where(active_fedora_model_ssi: []).count).to eq 0
expect(SpecModel::Basic.where(has_model_ssim: []).count).to eq 0
end

it "adds options" do
Expand Down

0 comments on commit 5a2b3a7

Please sign in to comment.