Bug 22592 - Elasticsearch - Support for index scan
Summary: Elasticsearch - Support for index scan
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: master
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Ere Maijala
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 22413
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-27 12:27 UTC by Ere Maijala
Modified: 2019-04-15 11:44 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 22592: Add index scan emulation to Elasticsearch (13.87 KB, patch)
2019-03-28 11:51 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22592: Fixes to index scan (3.14 KB, patch)
2019-03-28 11:51 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22592: Add index scan emulation to Elasticsearch (13.87 KB, patch)
2019-04-03 11:21 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22592: Fixes to index scan (3.14 KB, patch)
2019-04-03 11:21 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 22592: Add index scan emulation to Elasticsearch (13.94 KB, patch)
2019-04-09 18:49 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22592: Fixes to index scan (3.19 KB, patch)
2019-04-09 18:49 UTC, Michal Denar
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Ere Maijala 2019-03-27 12:27:27 UTC
We can emulate index scan at least to some extent by using faceting with an include filter.
Comment 1 Ere Maijala 2019-03-28 11:51:02 UTC
Created attachment 87135 [details] [review]
Bug 22592: Add index scan emulation to Elasticsearch

Adds support for using the "scan indexes" action in advanced search by using faceting with a prefix filter. Requires that the field be set as facetable for anything to be found.

Test plan:
1. Apply patch
2. Go to advanced search and click "More options"
3. Select author as the search field, enter a last name and check "Scan indexes"
4. Perform search and observe the result list resembling scan results
Comment 2 Ere Maijala 2019-03-28 11:51:05 UTC
Created attachment 87136 [details] [review]
Bug 22592: Fixes to index scan

Makes sure the scan term is displayed and redirection to record page is not used with index scan for a single result. Also adds a submit button so that you can submit a change for selected index or term easier.
Comment 3 Stefan Berndtsson 2019-04-03 11:12:47 UTC
I can't apply this patch. Do I need anything other than 22413 to make this work?

It fails with:

Applying: Bug 22592: Add index scan emulation to Elasticsearch
error: sha1 information is lacking or useless (Koha/SearchEngine/Elasticsearch/QueryBuilder.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 22592: Add index scan emulation to Elasticsearch
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-22592-Add-index-scan-emulation-to-Elasticsearc-iqm9C3.patch
Comment 4 Ere Maijala 2019-04-03 11:21:09 UTC
Created attachment 87344 [details] [review]
Bug 22592: Add index scan emulation to Elasticsearch

Adds support for using the "scan indexes" action in advanced search by using faceting with a prefix filter. Requires that the field be set as facetable for anything to be found.

Test plan:
1. Apply patch
2. Go to advanced search and click "More options"
3. Select author as the search field, enter a last name and check "Scan indexes"
4. Perform search and observe the result list resembling scan results
Comment 5 Ere Maijala 2019-04-03 11:21:12 UTC
Created attachment 87345 [details] [review]
Bug 22592: Fixes to index scan

Makes sure the scan term is displayed and redirection to record page is not used with index scan for a single result. Also adds a submit button so that you can submit a change for selected index or term easier.
Comment 6 Ere Maijala 2019-04-03 11:23:02 UTC
Stefan, thanks for testing. Nothing else is needed. I had to rebase, though, since there were changes in master. Just let bz follow the dependency and you should be good (for now...).
Comment 7 Michal Denar 2019-04-09 18:39:11 UTC
Hi Ere,
I'm not sure what but something make Elastic broken. I can!t reidex ES, U get:
Can't locate object method "throw" via package "Koha::Exceptions::Elasticsearch::MARCFieldExprParseError" (perhaps you forgot to load "Koha::Exceptions::Elasticsearch::MARCFieldExprParseError"?) at /home/vagrant/kohaclone/Koha/SearchEngine/Elasticsearch.pm line 794.

I followed all dependencies.
Comment 8 Michal Denar 2019-04-09 18:47:20 UTC
Hi Ere,
I'm not sure what but something make Elastic broken. I can!t reidex ES, U get:
Can't locate object method "throw" via package "Koha::Exceptions::Elasticsearch::MARCFieldExprParseError" (perhaps you forgot to load "Koha::Exceptions::Elasticsearch::MARCFieldExprParseError"?) at /home/vagrant/kohaclone/Koha/SearchEngine/Elasticsearch.pm line 794.

I followed all dependencies.
Comment 9 Michal Denar 2019-04-09 18:48:14 UTC
Sorry, T was some problem with my kohadevbox. I set Need signet off back.
Comment 10 Michal Denar 2019-04-09 18:49:46 UTC
Created attachment 87668 [details] [review]
Bug 22592: Add index scan emulation to Elasticsearch

Adds support for using the "scan indexes" action in advanced search by using faceting with a prefix filter. Requires that the field be set as facetable for anything to be found.

Test plan:
1. Apply patch
2. Go to advanced search and click "More options"
3. Select author as the search field, enter a last name and check "Scan indexes"
4. Perform search and observe the result list resembling scan results

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 11 Michal Denar 2019-04-09 18:49:49 UTC
Created attachment 87669 [details] [review]
Bug 22592: Fixes to index scan

Makes sure the scan term is displayed and redirection to record page is not used with index scan for a single result. Also adds a submit button so that you can submit a change for selected index or term easier.

Signed-off-by: Michal Denar <black23@gmail.com>