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

Show "found in" hints to indicate where search terms were found #5728

Closed
2 of 4 tasks
elynema opened this issue Mar 13, 2024 · 6 comments
Closed
2 of 4 tasks

Show "found in" hints to indicate where search terms were found #5728

elynema opened this issue Mar 13, 2024 · 6 comments

Comments

@elynema
Copy link
Contributor

elynema commented Mar 13, 2024

Description

Show "found in" hints to indicate to user if search term(s) were found in:

  • metadata: descriptive metadata only
  • section labels + structure: section labels + any sub-structure
  • transcript

Done Looks Like

  • show found in results below metadata for each item in search results as:
    Found in: metadata (5)
    Found in: sections (6)
  • if there is a zero count for either of these 3 parts (metadata, transcripts, sections), do not display that part
  • do not show "found in" when results are showing from a browse, not search
  • For phrase searches with quotes, only media objects with that phrase should be returned, but the "found in" counts should be the same as if no quotes.
@joncameron
Copy link
Contributor

Can wait until previous investigation; will need to look at highlighting in Solr.

@elynema
Copy link
Contributor Author

elynema commented Apr 16, 2024

Currently storing transcript as text, not text_en, so stemming is probably not happening. May want to re-consider this. Metadata hits are coming from a field with the entire MODS as text_en.

@elynema
Copy link
Contributor Author

elynema commented Apr 19, 2024

Mostly working, but search results are not being returned if there are no hits in the metadata or sections. Hits occurring only in transcript are not getting pushed out as results for the search.

Alos need to clean up splitting terms, Solr escaping them. Quoted phrase search should not cause error.

@joncameron
Copy link
Contributor

  • Make sure we're splitting search terms cleanly
  • Make sure Solr escaping is appropriate (check Blacklight handling of this)
  • Double quotes break search right now, etc.
  • Do we want to show "Found in" in all cases? Should we show "(0)" count results, or not display that?

@masaball
Copy link
Contributor

The new query set up to facilitate "Found in" hints and return transcript results adjusted the way that results are returned in the solr document. Previously, I think the entire solr document was being returned. The new query structure explicitly searches for specific fields. A quick audit of the code indicated that the minimum fields that need to be returned for parity with current Avalon are:

  • has_model_ssim
  • id
  • title_tesi
  • abstract_ssi
  • date_issued_ssi
  • date_created_ssi
  • duration_ssi
  • section_id_ssim
  • avalon_resource_type_ssim

Most of these are to make sure that the metadata on the search page is properly filled. avalon_resource_type_ssim is necessary for displaying the thumbnails.

@joncameron
Copy link
Contributor

Created #5903 for not displaying zero-count field results, otherwise this is working as expected in my testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants