Bug 41860

Summary: With Zebra, authority search plugin gives no result in some cases
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: MARC Authority data supportAssignee: Janusz Kaczmarek <januszop>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35903
GIT URL: Initiative type: ---
Sponsorship status: Sponsored Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 41859    
Bug Blocks:    
Attachments: Bug 41860: With Zebra, authority search plugin gives no result in some cases

Description Janusz Kaczmarek 2026-02-16 14:53:30 UTC
When using Zebra, authority search plugin gives no result when the search term was was auto completed and it contains subdivisions and the search is performed with 'Search all headings' or 'Search entire record'.

To reproduce: 
1. Have SearchEngine set to Zebra.
2. When cataloging, go to field 650 and use the authority plugin.
3. In 'Search all headings:' or 'Search entire record:' start typing 'Computer
  software' and choose any hint (with subdivision). Note that the operator has 
  changed to 'is exactly'. Perform the search. You should get no results, despite
  of the existence of the record. You only get the results after changing the 
  operator to 'contains'.

This is because of the construction of Match and Any indexes in Zebra.
Comment 1 Janusz Kaczmarek 2026-02-17 15:16:15 UTC
Created attachment 193327 [details] [review]
Bug 41860: With Zebra, authority search plugin gives no result in some cases

When using Zebra, authority search plugin gives no result when the
search term was was auto completed and it contains subdivisions and
the search is performed with 'Search all headings' or 'Search entire
record'.

This is because of the construction of Match and Any indexes in
Zebra.

The current behavior is incomprehensible and upsetting to librarians.

Test plan:
==========
1. Have a KTD instance with a standard data set. Have SearchEngine
   set to Zebra.
2. When cataloging, go to field 650 and use the authority plugin.
3. In 'Search all headings:' or 'Search entire record:' start typing
   'Computer software' and choose any hint (with subdivision). Note
   that the operator has changed to 'is exactly'.
4. Perform the search. You should get no results, despite of the
   existence of the record.
   You only get the results after changing the operator to 'contains'.
5. Clean the browser's cache. Apply the patch.
6. Repeat p. 2, 3 & 4. You should be now able to find the record
   easily, without having to manually change the search type.

The proposed behavior (not setting the search type to 'exact' for
'Search all headings:' or 'Search entire record:') seems like a
reasonable compromise.

Sponsored-by: Ignatianum University in Cracow