Bug 26903 - Authority records not being indexed in Elasticsearch
Summary: Authority records not being indexed in Elasticsearch
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Nick Clemens (kidclamp)
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 26543
  Show dependency treegraph
 
Reported: 2020-11-03 01:07 UTC by Andrew Fuerste-Henry
Modified: 2021-12-13 21:08 UTC (History)
5 users (show)

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


Attachments
Bug 26903: Unit tests (2.72 KB, patch)
2020-11-13 16:40 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 26903: Pass record ids and records through to update_index when passed to index_records (1.93 KB, patch)
2020-11-13 16:41 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 26903: Unit tests (2.76 KB, patch)
2020-11-14 18:05 UTC, David Nind
Details | Diff | Splinter Review
Bug 26903: Pass record ids and records through to update_index when passed to index_records (1.98 KB, patch)
2020-11-14 18:05 UTC, David Nind
Details | Diff | Splinter Review
Bug 26903: Unit tests (2.82 KB, patch)
2020-11-16 13:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26903: Pass record ids and records through to update_index when passed to index_records (2.04 KB, patch)
2020-11-16 13:35 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26903: [20.05.x] Pass record ids and records through to update_index when passed to index_records (4.68 KB, patch)
2020-12-10 11:43 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2020-11-03 01:07:42 UTC
To recreate:
- set your SearchEngine to Elastic
- have an authority record
- stage and import it
- use link from completed import to see authority and confirm it exists in your system
- search for authority, confirm you cannot find it
Comment 1 Nick Clemens (kidclamp) 2020-11-13 16:40:58 UTC
Created attachment 113613 [details] [review]
Bug 26903: Unit tests
Comment 2 Nick Clemens (kidclamp) 2020-11-13 16:41:01 UTC
Created attachment 113614 [details] [review]
Bug 26903: Pass record ids and records through to update_index when passed to index_records

When both a record and record_id are passed to index_records the data should be passed through
to update_index. We missed copying over the record ids to the variable we use as a check.

To test:
1 - Set searchEngine system preference to Elasticsearch
2 - Reindex your db
3 - Search authorities
4 - Edit a record and add 'testwaffle' to the main heading
5 - Search authorities for 'testwaffle' - no results
6 - Apply patch
7 - Edit the record again, change 'testwaffle' to 'testpancake'
8 - Search authorities for 'testpancake' - result!
9 - Confirm imported authorities and authorities added via Z39 are correctly indexed
Comment 3 David Nind 2020-11-14 18:05:10 UTC
Created attachment 113644 [details] [review]
Bug 26903: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2020-11-14 18:05:13 UTC
Created attachment 113645 [details] [review]
Bug 26903: Pass record ids and records through to update_index when passed to index_records

When both a record and record_id are passed to index_records the data should be passed through
to update_index. We missed copying over the record ids to the variable we use as a check.

To test:
1 - Set searchEngine system preference to Elasticsearch
2 - Reindex your db
3 - Search authorities
4 - Edit a record and add 'testwaffle' to the main heading
5 - Search authorities for 'testwaffle' - no results
6 - Apply patch
7 - Edit the record again, change 'testwaffle' to 'testpancake'
8 - Search authorities for 'testpancake' - result!
9 - Confirm imported authorities and authorities added via Z39 are correctly indexed

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Martin Renvoize (ashimema) 2020-11-16 13:35:40 UTC
Created attachment 113664 [details] [review]
Bug 26903: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2020-11-16 13:35:43 UTC
Created attachment 113665 [details] [review]
Bug 26903: Pass record ids and records through to update_index when passed to index_records

When both a record and record_id are passed to index_records the data should be passed through
to update_index. We missed copying over the record ids to the variable we use as a check.

To test:
1 - Set searchEngine system preference to Elasticsearch
2 - Reindex your db
3 - Search authorities
4 - Edit a record and add 'testwaffle' to the main heading
5 - Search authorities for 'testwaffle' - no results
6 - Apply patch
7 - Edit the record again, change 'testwaffle' to 'testpancake'
8 - Search authorities for 'testpancake' - result!
9 - Confirm imported authorities and authorities added via Z39 are correctly indexed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize (ashimema) 2020-11-16 13:36:42 UTC
Works as expected, passing QA
Comment 8 Jonathan Druart 2020-11-17 11:26:13 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 9 Andrew Fuerste-Henry 2020-12-09 20:24:24 UTC
Doesn't apply cleanly to 20.05, please rebase
Comment 10 Nick Clemens (kidclamp) 2020-12-10 11:43:30 UTC
Created attachment 114299 [details] [review]
Bug 26903: [20.05.x] Pass record ids and records through to update_index when passed to index_records

When both a record and record_id are passed to index_records the data should be passed through
to update_index. We missed copying over the record ids to the variable we use as a check.

To test:
1 - Set searchEngine system preference to Elasticsearch
2 - Reindex your db
3 - Search authorities
4 - Edit a record and add 'testwaffle' to the main heading
5 - Search authorities for 'testwaffle' - no results
6 - Apply patch
7 - Edit the record again, change 'testwaffle' to 'testpancake'
8 - Search authorities for 'testpancake' - result!
9 - Confirm imported authorities and authorities added via Z39 are correctly indexed

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 26903: Unit tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Andrew Fuerste-Henry 2020-12-10 21:30:04 UTC
backported to 20.05.x for 20.05.07
Comment 12 Victor Grousset/tuxayo 2020-12-11 16:11:14 UTC
index_records doesn't exist in 19.11

Missing dependencies for 19.11.x, can't backport.