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

highlight search term in viewer by default - edge case handling #142

Open
ebenenglish opened this issue Apr 22, 2019 · 0 comments
Open

highlight search term in viewer by default - edge case handling #142

ebenenglish opened this issue Apr 22, 2019 · 0 comments
Assignees
Labels
Backlog Items of anticipated future work (feature, task, technical debt) IIIF Content Search IIIF viewer Priority: Low

Comments

@ebenenglish
Copy link
Collaborator

As described in #128, there are some slight drawbacks to the current implementation of having the UV IIIF viewer automatically run a search for a user's query term, where ...

1: If the keyword search matches text from the item metadata that is not present in the full text, the UV will display a "No matches were found" message when the viewer loads.

This seems like it will likely be a minor issue, since NewspaperPage objects have very minimal descriptive metadata, and search results will most likely be the result of keyword matches in the OCR field. (NewspaperArticle objects may have significantly more descriptive metadata, but the majority of implementations do not have article-level data.)

2: If the keyword search matches stemmed text from the Solr text field, but not the exact text string in the OCR, the viewer will not be able to display a highlight for the term.

This happes because the code that matches the search term to the JSON word-coordinate file only looks for exact matches (NewspaperWorks::BlacklightIiifSearch::AnnotationBehavior#coordinates). Need to make sure there is robust error handling in this method to deal with this edge case and ensure that the app doesn't throw an error.

(See this commit from BPL's Commonwealth app for example.)

@ebenenglish ebenenglish added Priority: Low IIIF Content Search Backlog Items of anticipated future work (feature, task, technical debt) IIIF viewer labels Apr 22, 2019
@ebenenglish ebenenglish self-assigned this Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog Items of anticipated future work (feature, task, technical debt) IIIF Content Search IIIF viewer Priority: Low
Projects
None yet
Development

No branches or pull requests

1 participant