Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV loader does not convey data for exhibit-specific fields into Solr #2994

Open
mephillips-durham opened this issue Nov 21, 2023 · 0 comments

Comments

@mephillips-durham
Copy link
Contributor

Summary

The "Add items" function includes a tab "Upload multiple items" which allows you to load in a CSV file. If there are exhibit-specific fields, these are given as column headings in the CSV template provided by that function, but any data provided in those columns does not get stored or indexed in Solr.

Steps to reproduce

On a minimally-customised Spotlight application based on the latest Spotlight engine, create an exhibit, and in the Metadata area of the dashboard create a new field. For example, you might use the Label "Subject". Depending on whether you tick the "Controlled vocabulary" option, the field subject_tesim or subject_ssim will be created.

You can then go to "Upload multiple items" and download the template, which will include the new field.

If you load the CSV file with data in that column, the data appears in the spotlight_resources record, serialised in the "data" field, but it does not appear in spotlight_solr_document_sidecars, and is not stored or indexed in Solr. This means it is not available to be shown in the results.

If we find one of the records uploaded in this way, and click Edit, we get a form with the Subject field available. If we enter data in there and save it, the information is correctly stored in spotlight_solr_document_sidecars and Solr, and will appear in the results.

Fields which have been configured globally across all exhibits by defining them in config/initializers/spotlight_initializer.rb are not affected in this way: you can load those via the CSV loader without any trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant