Bug 34245

Summary: Scan index option only works on limited indexes
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Searching - ElasticsearchAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 - low CC: januszop
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 22592    
Bug Blocks:    

Description Nick Clemens (kidclamp) 2023-07-10 13:27:43 UTC
Currently in the code, the only indexes in ES that can be used with 'scan' are:
 647 our %scan_field_convert = (
 648     'ti' => 'title',
 649     'au' => 'author',
 650     'su' => 'subject',
 651     'se' => 'title-series',
 652     'pb' => 'publisher',
 653 );


This is not apparent to the end user, and causes confusion. We need to broaden support, or limit the displayed list of options for 'scan indexes'
Comment 1 Katrin Fischer 2023-07-16 11:19:14 UTC
Limiting the list when Elasticsearch is used makes sense to me. Should we hardcode the list or would it be possible to look-up which of the indexes are configured to work? I would support both fixes, we have the most important ones covered I think.
Comment 2 Janusz Kaczmarek 2024-05-29 18:25:50 UTC
I agree that the use of the scan feature is somehow obscure now.  I couldn't find a clear explanation in the doc about it.  In the code it is more or less clear, but for the user -- not.

How about sending a user to the page like:

/cgi-bin/koha/catalogue/search.pl?advsearch=1&idx=au&q=a&scan=1&sort_by=relevance

after checking the "Scan indexes" checkbox?  Currently this page is available only as a result page.  And the list of the indexes with the scan/browse feature is there.

Or even better: how about if we made a separate "Scan [browse] indexes" search page, as a third search page (Advanced search, Item search, Browse indexes)?