move away from mods parsing in search results #2042
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In conjunction with sul-dlss/searchworks_traject_indexer#224 this fixes #1987
This approach could be controversial, so I'll outline my rationale:To keep current functionality we would need to create/invent a custom data structure that should be understood by both the indexer and SearchWorks. This seemed potentially brittle given that the mods logic could change and without knowing if we have changing future requirements. Though this approach assumes that the content is indexed and displayed with the same version of the ModsDisplay gem.If the ModsDisplay gem is updated in SearchWorks, the change will also need to happen in the indexer. Need to discuss w/ @jvine about the ModsDisplay updates and how the name may change.UPDATE 11/13/2018
This PR is updated now to be backwards compatible with an index that does not yet have the new fields. As these new fields are added, the view will look for those fields instead of parsing the mods. Finally, after the entire new index is in place, we can remove the TODO blocks.
Local example: http://127.0.0.1:3000/catalog?utf8=%E2%9C%93&search_field=search&q=47