scientist-softserv / adventist_knapsack

Apache License 2.0
2 stars 0 forks source link

Persistent highlighting of search terms not working #177

Open KatharineV opened 5 months ago

KatharineV commented 5 months ago

Testing the Knapsack upgrade, my highlighted search terms do not stay highlighted when I open a work from the catalog search.

Here's the search where the term is highlighted and shows in a snippet.

Image

Here is the work page that opened with a URL referencing the parent query, but the UV doesn't show my highlighted keyword in the document automatically, which is the behavior I expect.

https://adl.b2.adventistdigitallibrary.org/concern/published_works/22266468_cardinal_1986?parent_query=swimming Image

ShanaLMoore commented 5 months ago

related PRs from Adventist's original implementation:

https://github.com/scientist-softserv/adventist-dl/pull/471 https://github.com/scientist-softserv/adventist-dl/pull/476

This issue may be related to this comment

Confirming the UV search when you type it in manually: (locally)

Image

But when you search for the word in the catalog controller and click into the work, it does not auto perform the search in the UV (aka persist) even though the search term is in the url: 🤔

Image

Image

ShanaLMoore commented 5 months ago

This may be related to this error:

ShanaLMoore commented 5 months ago

this looks to be resolved, possibly be sorting out the incorrect versioning issue. no code changes have been made

https://share.zight.com/NQuALWrY

ShanaLMoore commented 5 months ago

Pass: ✅

STAGING search for Minute. Click into work and that word is highlighted

Image

KatharineV commented 5 months ago

On ADL prod, the keyword highlights in yellow, but it is not persistent into the work. See screenshots below for the search where it is highlighted and the work page with parent_query=oregon in the URL, but no highlighting.

Prod

Image

Image

I tested on a staging site and the behavior was similar but different. Keyword highlights in the search and appears in the work URL, but it doesn't show up in the UV at all. This is different from prod, where at least the UV searchbar has the word persistently (without highlighting or showing in context, which would be the expected behavior).

Staging

Image

Image

ShanaLMoore commented 5 months ago

@KatharineV For staging, this is likely related to the ssl_configured not being enabled again for the staging instance.

After setting this tenant's ssl configuration, I searched for the word Bible and this is the result:

Image

To clarify, when you say it's not highlighted, do you mean you shouldn't have to click the blue icons that shows what pages the word was found on? This is the behavior I see in prod as well.

KatharineV commented 5 months ago

@ShanaLMoore re: your question, if I recall the original functionality correctly, the persistent highlighting used to open the work page with the first highlighted instance open in the viewer. The user did not have to click "next result" to view the first instance of the search term.

ShanaLMoore commented 5 months ago

Dev notes:

check out the related PRs

ShanaLMoore commented 5 months ago

Also noting that a match is being found on page 1 when there isn't really an instance of the word FLOOR there

Image

ShanaLMoore commented 5 months ago

disregard my last comment. thumbnails aren't supposed to be displayed in the UV. I must've done something abnormal in my example.

However I can still confirm that when you search, the user is required to click "next result" to find the first match. The user should be taken to the first match automatically.