Bug 37494 - catalogue/showelastic.pl missing parameter "type"
Summary: catalogue/showelastic.pl missing parameter "type"
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 35618
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-26 13:26 UTC by Fridolin Somers
Modified: 2025-02-05 13:43 UTC (History)
4 users (show)

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


Attachments
Bug 37494: Fix catalogue/showelastic.pl missing parameter "type" (1.02 KB, patch)
2024-07-26 13:32 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2024-07-26 13:26:58 UTC
In Bug 35618 Danyon provides a counter patch that fixes catalogue/showelastic.pl missing parameter "type"
Comment 1 Fridolin Somers 2024-07-26 13:32:55 UTC
Created attachment 169712 [details] [review]
Bug 37494: Fix catalogue/showelastic.pl missing parameter "type"

In Bug 35618 Danyon provides a counter patch that fixes
catalogue/showelastic.pl missing parameter "type".

ES 7/8 uses '_doc'

Test plan :
1) Use Elasticsearch search engine
2) Search whatever you want in Search the catalog and select a notice
3) Click on "Elasticsearch Record :" link
=> Without patch you have HTTP 404
=> With patch you see datas in JSON
Comment 2 Nick Clemens (kidclamp) 2024-07-26 16:54:54 UTC
I am using KTD - with es8 option

kohadev-koha@kohadevbox:koha(main)$ curl es:9200
{
  "name" : "71a3c12510b3",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "N3U1Y38qQdy4HdsAKBO5iA",
  "version" : {
    "number" : "8.13.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "09df99393193b2c53d92899662a8b8b3c55b45cd",
    "build_date" : "2024-03-22T03:35:46.757803203Z",
    "build_snapshot" : false,
    "lucene_version" : "9.10.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

Before patch - succeeds
After path - 404

I think there must be a configuration issue here that explains why our results are different
Comment 3 Fridolin Somers 2024-09-06 09:47:46 UTC
Using command line works with :
  curl es:9200/index_biblios/_doc/1234

_doc is used even in ES8 :
https://www.elastic.co/guide/en/elasticsearch/reference/8.15/docs-get.html

But not sure this is directly related.

Also I see Search::Elasticsearch is still in 6.80, normal ?
In cpanfile and packages :
http://debian.koha-community.org/koha/dists/23.11/main/binary-amd64/Packages

Can someone give another shot please ?
Comment 4 Fridolin Somers 2024-12-09 11:08:15 UTC
Could someone give another shot please ?
Comment 5 David Nind 2024-12-09 19:08:23 UTC
I'm not seeing the 404 error using main, and ES7 or ES8.

Tested using KTD with ES8:
1. No 404 error, ES record details are shown in the dialog box 
2. curl es:9200/koha_kohadev_biblios/_doc/5 works as expected
3. Details:
 curl es:9200
{
  "name" : "ac053598f5a6",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "xhklomdtSoa8opTC6b6eiQ",
  "version" : {
    "number" : "8.13.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "09df99393193b2c53d92899662a8b8b3c55b45cd",
    "build_date" : "2024-03-22T03:35:46.757803203Z",
    "build_snapshot" : false,
    "lucene_version" : "9.10.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"

Tested using KTD with ES7:
1. No 404 error, ES record details are shown in the dialog box 
2. curl es:9200/koha_kohadev_biblios/_doc/5 works as expected
3. Details:
curl es:9200
{
  "name" : "c7374ef1fef8",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "l10NN4FeTMG8Qu_MfSw60g",
  "version" : {
    "number" : "7.17.20",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "b26557f585b7d95c71a5549e571a6bcd2667697d",
    "build_date" : "2024-04-08T08:34:31.070382898Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.3",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
Comment 6 Fridolin Somers 2024-12-20 13:14:46 UTC
I can now reproduce the behavior on Ubuntu Noble.
This patch is indeed not needed.
I see libsearch-elasticsearch-perl is 8.12-1
Comment 7 Fridolin Somers 2024-12-20 13:15:13 UTC
Thanks Nick and David for your tests ;)