Bug 34481

Summary: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: SearchingAssignee: Fridolin Somers <fridolin.somers>
Status: Needs documenting --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: a.roussos, david, f.demians, lucas, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32509
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This enhancement adds 'see also from' authority record headings (5XX) to bibliographic searches. This is enabled by using the new IncludeSeeAlsoFromInSearches system preference, and requires a reindex.
Version(s) released in:
24.11.00
Circulation function:
Attachments: Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches
Bug 34481: Tidy altered code

Description Fridolin Somers 2023-08-04 19:32:50 UTC
Like IncludeSeeFromInSearches adds see from heading in search (4xx), add a system preference IncludeSeeAlsoFromInSearches to add see also from heading (5xx).
Comment 1 Fridolin Somers 2024-03-19 15:39:23 UTC
Created attachment 163456 [details] [review]
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches

Like IncludeSeeFromInSearches adds see from heading in search (4xx),
new system preference IncludeSeeAlsoFromInSearches adds see also from heading (5xx).

Test plan:
Test on both Elasticsearch and Zebra:
1)
1.1) Create an authority record with heading, see from heading 4xx and see also from heading 5xx
1.2) Use this authority in a biblio record
2)
2.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Don't include"
2.3) Rebuild search engine
2.4) Perform a search on heading text => you find the biblio record
2.5) Perform a search on see from heading => you do not find the biblio record
2.6) Perform a search on see also from heading => you do not find the biblio record
3)
3.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Include"
3.2) Rebuild search engine
3.3) Perform a search on heading text => you find the biblio record
3.4) Perform a search on see from heading => you find the biblio record
3.5) Perform a search on see also from heading => you find the biblio record
Comment 2 Frédéric Demians 2024-03-29 16:56:23 UTC
This line:
my $marc_filter = Koha::Koha::Filter::MARC::EmbedSeeFromHeadings->new;

should be:
my $marc_filter = Koha::Filter::MARC::EmbedSeeFromHeadings->new;

Otherwise, all good! Do I fix it directly while signing?
Comment 3 Fridolin Somers 2024-04-02 07:09:42 UTC
Ah no I will fix
Comment 4 Fridolin Somers 2024-04-02 07:44:22 UTC
Created attachment 164236 [details] [review]
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches

Like IncludeSeeFromInSearches adds see from heading in search (4xx),
new system preference IncludeSeeAlsoFromInSearches adds see also from heading (5xx).

Test plan:
Test on both Elasticsearch and Zebra:
1)
1.1) Create an authority record with heading, see from heading 4xx and see also from heading 5xx
1.2) Use this authority in a biblio record
2)
2.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Don't include"
2.3) Rebuild search engine
2.4) Perform a search on heading text => you find the biblio record
2.5) Perform a search on see from heading => you do not find the biblio record
2.6) Perform a search on see also from heading => you do not find the biblio record
3)
3.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Include"
3.2) Rebuild search engine
3.3) Perform a search on heading text => you find the biblio record
3.4) Perform a search on see from heading => you find the biblio record
3.5) Perform a search on see also from heading => you find the biblio record
Comment 5 Fridolin Somers 2024-04-02 07:44:48 UTC
(In reply to Fridolin Somers from comment #3)
> Ah no I will fix

Fixed ;)
Comment 6 Frédéric Demians 2024-04-02 09:07:56 UTC
Created attachment 164246 [details] [review]
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches

Like IncludeSeeFromInSearches adds see from heading in search (4xx),
new system preference IncludeSeeAlsoFromInSearches adds see also from heading (5xx).

Test plan:
Test on both Elasticsearch and Zebra:
1)
1.1) Create an authority record with heading, see from heading 4xx and see also from heading 5xx
1.2) Use this authority in a biblio record
2)
2.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Don't include"
2.3) Rebuild search engine
2.4) Perform a search on heading text => you find the biblio record
2.5) Perform a search on see from heading => you do not find the biblio record
2.6) Perform a search on see also from heading => you do not find the biblio record
3)
3.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Include"
3.2) Rebuild search engine
3.3) Perform a search on heading text => you find the biblio record
3.4) Perform a search on see from heading => you find the biblio record
3.5) Perform a search on see also from heading => you find the biblio record

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Comment 7 Kyle M Hall (khall) 2024-05-17 10:52:53 UTC
Created attachment 166885 [details] [review]
Bug 34481: Add IncludeSeeAlsoFromInSearches like IncludeSeeFromInSearches

Like IncludeSeeFromInSearches adds see from heading in search (4xx),
new system preference IncludeSeeAlsoFromInSearches adds see also from heading (5xx).

Test plan:
Test on both Elasticsearch and Zebra:
1)
1.1) Create an authority record with heading, see from heading 4xx and see also from heading 5xx
1.2) Use this authority in a biblio record
2)
2.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Don't include"
2.3) Rebuild search engine
2.4) Perform a search on heading text => you find the biblio record
2.5) Perform a search on see from heading => you do not find the biblio record
2.6) Perform a search on see also from heading => you do not find the biblio record
3)
3.1) Set IncludeSeeFromInSearches and IncludeSeeAlsoFromInSearches to "Include"
3.2) Rebuild search engine
3.3) Perform a search on heading text => you find the biblio record
3.4) Perform a search on see from heading => you find the biblio record
3.5) Perform a search on see also from heading => you find the biblio record

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 8 Kyle M Hall (khall) 2024-05-17 10:52:59 UTC
Created attachment 166886 [details] [review]
Bug 34481: Tidy altered code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Katrin Fischer 2024-06-27 10:07:33 UTC
While we have a librarian RM, this IS a blocker ;)

 FAIL	installer/data/mysql/mandatory/sysprefs.sql
   FAIL	  sysprefs_order
		Not blocker: Sysprefs IncludeSeeAlsoFromInSearches is bad placed (see bug 10610)

Will fix.
Comment 10 Katrin Fischer 2024-06-27 12:06:18 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 11 Tomás Cohen Arazi (tcohen) 2024-07-11 18:30:28 UTC
Shouldn't we name it `IncludeSeeAlsoInSearches` instead? <.<
Comment 12 Tomás Cohen Arazi (tcohen) 2024-07-11 18:35:06 UTC
(In reply to Tomás Cohen Arazi from comment #11)
> Shouldn't we name it `IncludeSeeAlsoInSearches` instead? <.<

Nope, I got it wrong it seems: https://www.loc.gov/marc/authority/ad5xx.html
Comment 13 Lucas Gass (lukeg) 2024-07-19 15:26:33 UTC
Enhancement won't be backported to the 24.05.x series