Skip to content

Commit

Permalink
Add dates to keyword searchable fields
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcolvar authored and bkeese committed Mar 2, 2015
1 parent c95de8d commit 64c8802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/models/media_object.rb
Expand Up @@ -371,6 +371,7 @@ def to_solr(solr_doc = Hash.new, opts = {})
all_text_values << solr_doc["genre_sim"]
all_text_values << solr_doc["language_sim"]
all_text_values << solr_doc["physical_description_si"]
all_text_values << solr_doc["date_sim"]
solr_doc["all_text_timv"] = all_text_values.flatten
return solr_doc
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/catalog_controller_spec.rb
Expand Up @@ -114,7 +114,7 @@

describe "search fields" do
let(:media_object) { FactoryGirl.create(:fully_searchable_media_object) }
["title_tesi", "creator_ssim", "contributor_sim", "unit_ssim", "collection_ssim", "summary_ssi", "publisher_sim", "subject_topic_sim", "subject_geographic_sim", "subject_temporal_sim", "genre_sim", "physical_description_si", "language_sim"].each do |field|
["title_tesi", "creator_ssim", "contributor_sim", "unit_ssim", "collection_ssim", "summary_ssi", "publisher_sim", "subject_topic_sim", "subject_geographic_sim", "subject_temporal_sim", "genre_sim", "physical_description_si", "language_sim", "date_sim"].each do |field|
it "should find results based upon #{field}" do
skip "Language is broken in the factory" if field == "language_sim"
query = Array(media_object.to_solr[field]).first
Expand Down

0 comments on commit 64c8802

Please sign in to comment.