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

[i88] - update readme instructions for enabling ocr catalog search #94

Merged
merged 3 commits into from
Feb 6, 2023

Conversation

ShanaLMoore
Copy link
Contributor

@ShanaLMoore ShanaLMoore commented Jan 27, 2023

Summary

ref: #88
Catalog seraching for child metadata and OCR was not working. This MR identifies the manual changes a dev would need to make to fix it.

At a later date, we may discuss a way for the generator to implement this.

Expected Behavior

  • From the Parent UV, when a user searches for child metadata and there's a match, it should be highlighted in the UV
  • When a user performs a catalog search for OCR, the parent should return

Testing Instructions

This work is dependent upon #81

A Developer could test this locally. Otherwise, deploy hyku branch i87-ocr-search to hyku-iiif (ref testing instructions in #88 if you deploy)

Create a new branch, based off of #81 (i81-uv-text-search)
Follow the instructions in the MR

  1. Create a work. Upload an image that has text. OCR should run. Confirm that json coordinates are created as its derivatives. Confirm that a user can search for the text in the UV, and find a match.
  2. Create a work. Attach a child. Confirm that a user can visit the parent's UV, search for the child's metadata and find a match.
  3. A user should able be able to catalog search the child metadata and have its parent return
  4. A user should be able to catalog search the child's ocr term and have its parent return

If something appears to not be working, try to reindex first.

@ShanaLMoore ShanaLMoore changed the base branch from i81-uv-text-search to main January 27, 2023 00:49
@ShanaLMoore ShanaLMoore changed the base branch from main to i81-uv-text-search January 27, 2023 00:50
Base automatically changed from i81-uv-text-search to main January 31, 2023 16:38
@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 6, 2023

TODO: Shana to test to determine what work is left, before handing it off to @kirkkwang and @DeonFranklin

From hyku, I chcked out hyku-iiif-base and installed iiif_print. Additionally, I added the model_configuration to the Image model file. I also followed the instructions of this PR's readme.

I created an importer with a simple parent/child relationship. The child had the cat_scan file_set attached to it. Sample File: basic.zip

✅ I verified that the file_set has an all_text_tsimv property in its solr dashboard:

image

✅ I performed a catalog search for the word "eyes". It correctly returned the parent work:

image

✅ I performed an OCR search for the word "eyes", from the child work. It correctly found and highlighted the word:

image

❌ I performed an OCR search for the word "eyes", from the parent work. It did not find and highlight the word:
image

❌ I performed a child metadata search for the word "child", from the parent work. It did not find the child work:
image

✅ I performed a child metadata search for the word "child" from the catalog search. It correctly found and returned the parent work:

image

I recommend deleting the works every time you iterate on an import, otherwise the solr holds on to old values and it will mess up your assumptions + manual tests.

@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 6, 2023

I will do one final pass. If the above doesn't change, I will update this comment with my WIP hyku branch.

edit: i87-ocr-search

The parent OCR search is no longer working for some reason 🤔 I believe the #annotation_list from this PR was supposed to be responsible for searching children from the parent UV (per this LV PR)

@ShanaLMoore
Copy link
Contributor Author

ShanaLMoore commented Feb 6, 2023

Update, the above concerns are now passing: I needed to remove the following line from the iiif_search_builder.rb in hyku 🙃 I have since updated the readme with this instruction.

solr_parameters[:qf] = blacklight_config.iiif_search[:full_text_field]

cc @DeonFranklin @kirkkwang
✅ I performed an OCR search for the word "eyes", from the parent work. It found and highlight the word:

image

✅ I performed a child metadata search for the word "child", from the parent work. It found child work:

image

@ShanaLMoore ShanaLMoore marked this pull request as ready for review February 6, 2023 21:29
@ShanaLMoore ShanaLMoore changed the title [i88] - readme instructions for enabling ocr catalog search [i88] - update readme instructions for enabling ocr catalog search Feb 6, 2023
@ShanaLMoore ShanaLMoore merged commit 142ec93 into main Feb 6, 2023
@jeremyf jeremyf deleted the i88-catalog-ocr-search branch March 8, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants