-
Notifications
You must be signed in to change notification settings - Fork 9
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
Bookreader Navigation of search results within Creative Work Series objects has incorrect sequence #470
Comments
From @DiegoPino on slack:
|
@DiegoPino - in https://github.com/esmero/strawberryfield/blob/1.5.0/src/Controller/StrawberryfieldFlavorDatasourceSearchController.php#L112-L122 we have...
Do I understand the "search for IAB highlight" comment to mean that the conditions there (non-empty 'q' param, result format = 'json', page = 'all') indicate that we are searching for and intend to return ocr highlights? If so (and assuming the |
Hi @DiegoPino, I've ascertained that, for my project, the solution I proposed here is safe/valid: I have no cases where adding sorting by For my purposes, for now, I think I'll just do a composer patch so that I'm not blocked on this. But I know we need to think more expansively and identify cases where this assumption is not valid. What are the cases where Closely related question: if sorting on Finally, do we handle missing values sort correctly for this case (missing values should sort last in an ASC sort, I think - we would not want to sort by |
We have a object type that we call "CWSBook", which is basically a Creative Work Series (digital object collection) object with a series of "Page" objects as children that have the individual page image files. We are able to display this in IA Bookreader using the v2.1 IIIF Manifest. OCR is indexed for these pages with both
sequence_id
andparent_sequence_id
- where the latter records the order of the Pages in the CWSBook.The problem we are having is that when a search is performed in IAB, the search results are returned sorted by relevance, and not by the page sequence, and this results in the previous/next links in the search results area to jump the user seemingly wildly back and forth.
This is because the sequence of the pages being displayed in IAB corresponds to (comes from?) the
parent_sequence_id
value indexed in solr, not thesequence_id
, whereas \Drupal\strawberryfield\Controller\StrawberryfieldFlavorDatasourceSearchController::flavorfromSolrIndex sorts only bysequence_id
, when present.I'm able to force the correct sequence in the results and correct IAB behavior in my testing with this simple change
However, I'm not sure if there are cases where this
flavorfromSolrIndex
method may be called where this sort is not the correct behavior. I also wonder if sorting bysequence_id
- the current behavior - is always correct? TheflavorfromSolrIndex
method seems to be intended to be used pretty broadly. Are there cases where only sort by relevance is correct?The text was updated successfully, but these errors were encountered: