-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use member_ids_ssim instead of file_set_ids_ssim
file_set_ids_ssim has always been a verbatim copy of member_ids_ssim, and in works with many members it can become an awkwardly large piece of duplicated data in solr. PcdmObjectIndexer does not duplicate this field, but various systems expect it to be available. This change modifies those systems to use member_ids_ssim. Filtering by has_model_ssim is added where needed to filter collections from results.
- Loading branch information
Showing
9 changed files
with
41 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,20 +88,20 @@ | |
end | ||
let(:work1) do | ||
{ has_model_ssim: ["GenericWork"], id: "ff365c76z", title_tesim: ["me too"], | ||
file_set_ids_ssim: ["ff365c78h", "ff365c79s"], read_access_group_ssim: ["public"], | ||
member_ids_ssim: ["ff365c78h", "ff365c79s"], read_access_group_ssim: ["public"], | ||
edit_access_person_ssim: ["[email protected]"] } | ||
end | ||
let(:work2) do | ||
{ has_model_ssim: ["GenericWork"], id: "ff365c777", title_tesim: ["find me"], | ||
file_set_ids_ssim: [], read_access_group_ssim: ["public"], edit_access_person_ssim: ["[email protected]"] } | ||
member_ids_ssim: [], read_access_group_ssim: ["public"], edit_access_person_ssim: ["[email protected]"] } | ||
end | ||
let(:file1) do | ||
{ has_model_ssim: ["FileSet"], id: "ff365c78h", title_tesim: ["find me"], | ||
file_set_ids_ssim: [], edit_access_person_ssim: [user.user_key] } | ||
member_ids_ssim: [], edit_access_person_ssim: [user.user_key] } | ||
end | ||
let(:file2) do | ||
{ has_model_ssim: ["FileSet"], id: "ff365c79s", title_tesim: ["other file"], | ||
file_set_ids_ssim: [], edit_access_person_ssim: [user.user_key] } | ||
member_ids_ssim: [], edit_access_person_ssim: [user.user_key] } | ||
end | ||
|
||
before do | ||
|
@@ -144,13 +144,13 @@ | |
# NOTE: The old expected behavior was "finds a work and a work that contains a file set with a matching title". | ||
# This is no longer the case in a Valkyrie environment. A work's child file set's metadata is no longer passed in | ||
# to the work's SolrDocument. The only references to the containing file sets are their ids. | ||
it "finds a work and a work that contains a file set with a matching title", pending: 'FIXME: Valkyrie indexer should do this' do | ||
it "finds a work and a work that contains a file set with a matching title" do | ||
get :index, params: { q: 'find me', search_field: 'all_fields' } | ||
expect(assigns(:response).documents.map(&:id)).to contain_exactly(work1[:id], work2[:id]) | ||
end | ||
|
||
# NOTE: The same logic in the above comment applies here. | ||
it "finds a work that contains a file set with a matching title", pending: 'FIXME: Valkyrie indexer should do this' do | ||
it "finds a work that contains a file set with a matching title" do | ||
get :index, params: { q: 'other file', search_field: 'all_fields' } | ||
expect(assigns(:response).documents.map(&:id)).to contain_exactly(work1[:id]) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters