Auto UV Search
Closed this issue · 4 comments
Summary
This work was previously done for LV (PR), however it was removed per this comment. ref (use Rob's credentials in gitlab, via 1password): https://gitlab.com/notch8/louisville-hyku/-/issues/97 and https://gitlab.com/notch8/louisville-hyku/-/commit/c9de6f38315ef36829c53aea68e1352dae67f6bd
Our clients (ADL specifically) has since asked for this feature to be added back. Otherwise, the user will have to type the same search twice. Once from the catalog search, then again in the UV search, so this work would enhance the user experience.
Acceptance Criteria
- When a user clicks on the catalog search results, it passes the search term as param into work (via url)
- If a search param exists, pre-populate the UV search with the term so that the user doesn't have to re-type it.
- This feature should work with OCR and metadata searches.
Screenshots or Video
Testing Instructions
- Test using Essi
- You need a newly created work. Add metadata to this work for your testing.
- Wait for all the sidekiq jobs to clear
- OCR:
- From the catalog, search for an ocr term like "bread" (if using the sample file from above)
- Once you click into the work, the term should populate and search in the UV without making the user type in the UV search bar.
- METADATA:
- The same steps should apply here.
NOTE Searching for parent metadata will not succeed. A separate ESSI ticket has been created to address this.
Notes
The previous implentation had some missing logic. We need to consider adding conditionals:
- if it's a match to the page and it's ocr, fill in teh search box.
- if not, it's metadata: link to the page.
- else, there are no matches don't link it to anything or display a no match error.
Per Rob, If we get the original implementation, we can pair with him to add the conditionals.
Reason for removal in LV per this comment. this implementation may need to handle the case, where no matches are found.
Explained that this is dependent on how they accessed the parent work. When doing a search query in the catalog search, that query is passed along to the parent work show page. A UV search is then automatically executed. The catalog search searches metadata and OCR, while the UV searches OCR only. In the event a word/phrase was found through a metadata search, it would then return the error they’re seeing if that word/phrase is not also in the OCR of the parent or children. This automatic UV search would not happen if no query were done (facet filtering is fine).
For a better UX, they would like to remove the feature where a catalog search automatically queries in the uv viewer so that they don’t get the “no results were found” message
To confirm pipeline failure in meeting with IU on Tuesday
This passes SoftServ QA: See attached screenshots.
tested on:
- work with OCR search query: https://dcadmin-test.dlib.indiana.edu/concern/images/5712m653d?locale=en&query=bread
- same work with metadata search query: https://dcadmin-test.dlib.indiana.edu/concern/images/5712m653d?locale=en&parent_query=alternative
closed - already present in essi