Bug 41859 - Authority search autocomplete results not consistent with search results
Summary: Authority search autocomplete results not consistent with search results
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Janusz Kaczmarek
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 41860
  Show dependency treegraph
 
Reported: 2026-02-16 13:59 UTC by Janusz Kaczmarek
Modified: 2026-02-16 21:38 UTC (History)
0 users

See Also:
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:


Attachments
Bug 41859: Authority search autocomplete results not consistent with search results (4.59 KB, patch)
2026-02-16 14:35 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 41859: Authority search autocomplete results not consistent with search results (4.65 KB, patch)
2026-02-16 21:38 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2026-02-16 13:59:07 UTC
When cataloguing and using authority plugin, there is auto complete feature. But hints it produces are not consistent with search results made with the same operator. E.g. (with standard KTD test data set) typing 'reusability' in 'Search main heading'/'Search all headings'/'Search entire record' gives no hints but one result ("Computer software Reusability.")

It does not seem logical.

This is because standard search operator is set to 'contains' and the hardcoded operator for autocompletion is set to 'start'. At the same time, in Elasticsearch, the subdivisions are always included as part of indexed string. In Zebra, it also true (Heading and Match indices) except for 'Search entire record' which uses index 'Any'.

The expected behavior would be to have it consistent.
Comment 1 Janusz Kaczmarek 2026-02-16 14:35:19 UTC
Created attachment 193254 [details] [review]
Bug 41859: Authority search autocomplete results not consistent with search results

When cataloging and using authority plugin, there is auto complete
feature. But hints it produces are not consistent with search
results made with the same operator. E.g. (with standard KTD test
data set) typing 'reusability' in 'Search main heading'/'Search
all headings'/'Search entire record' gives no hints but one result
("Computer software Reusability.")

It does not seem logical.

Test plan:
==========
1. Have a standard KTD installation.
2. Start cataloging. Open authority plugin for any controlled field
   (e.g. 100). Start typing 'Peter' (in any input field) with the
   intention to find a person with the first name Peter (observe
   that search type is set to 'contains'). You will get no hints,
   despite of the existence of some Peters in the authority file.
3. Press Search button. You will have a few results containing
   'Peter'.
4. This is not what we expect. We expect that the hints are consistent
   with the search results.
5. Apply the patch ; clear the browser cache.
6. Repeat 2. You should get the hints now.
7. Change the search type to 'starts with'. Start typing 'Peter' - no
   hints now. Start typing e.g. davi... - the are a few hints from
   surnames.

Sponsored-by: Ignatianum University in Cracow
Comment 2 Roman Dolny 2026-02-16 21:38:35 UTC
Created attachment 193271 [details] [review]
Bug 41859: Authority search autocomplete results not consistent with search results

When cataloging and using authority plugin, there is auto complete
feature. But hints it produces are not consistent with search
results made with the same operator. E.g. (with standard KTD test
data set) typing 'reusability' in 'Search main heading'/'Search
all headings'/'Search entire record' gives no hints but one result
("Computer software Reusability.")

It does not seem logical.

Test plan:
==========
1. Have a standard KTD installation.
2. Start cataloging. Open authority plugin for any controlled field
   (e.g. 100). Start typing 'Peter' (in any input field) with the
   intention to find a person with the first name Peter (observe
   that search type is set to 'contains'). You will get no hints,
   despite of the existence of some Peters in the authority file.
3. Press Search button. You will have a few results containing
   'Peter'.
4. This is not what we expect. We expect that the hints are consistent
   with the search results.
5. Apply the patch ; clear the browser cache.
6. Repeat 2. You should get the hints now.
7. Change the search type to 'starts with'. Start typing 'Peter' - no
   hints now. Start typing e.g. davi... - the are a few hints from
   surnames.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>