Skip to content

Commit

Permalink
🐛 Search OCR on file sets only
Browse files Browse the repository at this point in the history
This commit will constrain the IIIF search to only search the file sets
of a work.  This way applications that use all_text_tsimv for both the
file sets and work (to support snippets) will not have the work's text
included in the search which would double the results.

Ref:
- notch8/palni_palci_knapsack#199
  • Loading branch information
kirkkwang committed Jan 27, 2025
1 parent acef382 commit 3331911
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/iiif_print/iiif_search_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def solr_params
return { q: 'nil:nil' } unless q

{
q: "#{q} AND (#{iiif_config[:object_relation_field]}:\"#{parent_document.id}\" OR id:\"#{parent_document.id}\")",
q: "#{q} AND has_model_ssim:FileSet AND (#{iiif_config[:object_relation_field]}:\"#{parent_document.id}\" OR id:\"#{parent_document.id}\")",
rows: rows,
page: page
}
Expand Down

0 comments on commit 3331911

Please sign in to comment.