Bug 25342: Force ES id as string
authorNick Clemens <nick@bywatersolutions.com>
Fri, 1 May 2020 14:48:55 +0000 (14:48 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 15 May 2020 22:26:26 +0000 (22:26 +0000)
commitfac0217787a58175a53452ffdc504b04f5ac92ef
treedd37595c93f81ba03f27e99091e03d20fe93da32
parent4f7d98d59185d3adfd255c53b5532e4aead2443f
Bug 25342: Force ES id as string

To test:
1 - Be using ES
2 - Find a unique record by searchign for title or seomthing
3 - Edit the record
4 - Repeat search and confirm you are returned to the details page
5 - Go to Tools->MARC modification templates
6 - Add a template and define an action
7 - Go to Tools->Batch record modification
8 - Select Enter a list of record numbers
9 - Enter the biblionumber of the record you searched for
10 - Use the marc modification template you setup
11 - Complete the modification
12 - Repeat your search
13 - note you get two results, both pointing to same biblionumber
14 - Check the ES index, note that you have two entries, one with the biblionumber, and the other with #.0, e.g.:
    curl -XGET 'es:9200/koha_kohadev_biblios/data/14.0?pretty'
    curl -XGET 'es:9200/koha_kohadev_biblios/data/14?pretty'
15 - Apply patch
16 - Delete and rebuild ES index
    perl misc/search_tools/rebuild_elasticsearch.pl -d -b
17 - Repeat 2-12
18 - No duplication this time

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 1bae59611da3ed166176fc67f5e68980afbb87d0)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch/Indexer.pm