Bug 23317 - Elasticsearch - IntranetCatalogSearchPulldown breaks searching indexes via query
Summary: Elasticsearch - IntranetCatalogSearchPulldown breaks searching indexes via query
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-15 15:54 UTC by Nick Clemens
Modified: 2020-11-30 21:45 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-07-15 15:54:30 UTC
To recreate:
1 - Enable ES
2 - On staff side search for sn:4 (or real biblionumber)
3 - You go to a bib
4 - Enable IntranetCatalogSearchPulldown
5 - Reload the page to search the dropdown
6 - Repeat search
7 - It fails
Comment 1 Ron Houk 2019-07-16 19:53:25 UTC
Being able to search indexes is a very useful feature and it would be nice to have it working with Elasticsearch.
Comment 2 Andrew Fuerste-Henry 2019-07-17 15:36:03 UTC
This jQuery in IntranetUserJS can bandaid the problem:
$(document).ready(function () {
    $("select.advsearch[name='idx'] option[value='kw,phr']").after('<option value="sn">Biblionumber</option>');
    $("select.advsearch[name='idx'] option[value='kw']").attr('value',"");
});
Comment 3 Andrew Fuerste-Henry 2019-07-17 16:11:03 UTC
Whoops, pasted a bit more than I meant to. Here's the relevant bit:

This jQuery in IntranetUserJS can bandaid the problem:
$(document).ready(function () {
    $("select.advsearch[name='idx'] option[value='kw']").attr('value',"");
});
Comment 4 Nick Clemens 2019-10-22 15:56:35 UTC
So this actually works in master currently, as long as 'keyword' is selected.

If you try to select 'Title' in the dropdown and then search 'au:dickens' it fails

Do we need to support searches like that?
Comment 5 Katrin Fischer 2019-11-24 12:50:00 UTC
(In reply to Nick Clemens from comment #4)
> So this actually works in master currently, as long as 'keyword' is selected.
> 
> If you try to select 'Title' in the dropdown and then search 'au:dickens' it
> fails
> 
> Do we need to support searches like that?

I think 'expert search' is only expected to work with keyword selected - if that is the question :)