Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harvester results - pagination doesn't work #6155

Closed
josegar74 opened this issue Feb 8, 2022 · 10 comments
Closed

Harvester results - pagination doesn't work #6155

josegar74 opened this issue Feb 8, 2022 · 10 comments
Labels
Milestone

Comments

@josegar74
Copy link
Member

josegar74 commented Feb 8, 2022

Describe the bug

Pagination button in the harvester results doesn't work. Seem a issue of version 4.0.x, previous versions seem fine.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new CSW harvester
  2. Execute it
  3. Click the metadata results tab in the harvester page
  4. Next page doesn't seem to do anything. Last page button issues a request that fails:
{
"servlet":"spring",
"message":"Error is: Bad Request.\nRequest:\n{"from":-20,"size":10,"sort":[{"resourceTitleObject.default.keyword":"asc"},"_score"],"query":{"function_score":{"boost":"5","functions":[{"filter":{"exists":{"field":"parentUuid"}},"weight":0.3},{"filter":{"match":{"cl_status.key":"obsolete"}},"weight":0.3},{"gauss":{"dateStamp":{"scale":"365d","offset":"90d","decay":0.5}}}],"score_mode":"multiply","query":{"bool":{"must":[{"terms":{"isTemplate":["y","n","s","t"]}},{"terms":{"harvesterUuid":["4226a948-591f-46ba-b797-7251f943b1b7"]}}],"filter":{"query_string":{"query":"* AND (draft:n OR draft:e)"}}}}}},"aggregations":{"availableInServices":{"filters":{"filters":{"availableInViewService":{"query_string":{"query":"+linkProtocol:/OGC:WMS.*/"}},"availableInDownloadService":{"query_string":{"query":"+linkProtocol:/OGC:WFS.*/"}}}}},"cl_hierarchyLevel.key":{"terms":{"field":"cl_hierarchyLevel.key"},"meta":{"vega":"arc"}},"tag.default":{"terms":{"field":"tag.default","size":10},"meta":{"vega":"arc"}}},"_source":{"includes":["id","uuid","overview.*","resource*","isTemplate","valid","op*"]},"track_total_hits":true}\n.\nError:\n{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"gn-records","node":"MyVyAUFfQdCxCWr9OVZWWg","reason":{"type":"illegal_argument_exception","reason":"numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count"}}],"caused_by":{"type":"illegal_argument_exception","reason":"numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count","caused_by":{"type":"illegal_argument_exception","reason":"numHits must be > 0; please use TotalHitCountCollector if you just need the total hit count"}}},"status":400}.",
"url":"/geonetwork/srv/api/search/records/_search",
"status":"400"
}

Expected behavior

Pagination buttons allow to display the result pages with the harvested metadata.

@josegar74 josegar74 added this to the 4.0.7 milestone Feb 8, 2022
@fxprunayre fxprunayre modified the milestones: 4.2.0, 4.2.1 May 19, 2022
@fxprunayre fxprunayre modified the milestones: 4.2.1, 4.2.2 Sep 12, 2022
@fxprunayre fxprunayre modified the milestones: 4.2.2, 4.2.3 Dec 12, 2022
@fxprunayre fxprunayre modified the milestones: 4.2.3, 4.2.4 Mar 7, 2023
@fxprunayre fxprunayre modified the milestones: 4.2.4, 4.2.5 May 10, 2023
@fxprunayre fxprunayre modified the milestones: 4.2.5, 4.2.6 Jul 10, 2023
@fxprunayre fxprunayre modified the milestones: 4.2.6, 4.4.1 Oct 4, 2023
@fxprunayre fxprunayre modified the milestones: 4.4.1, 4.4.2 Nov 22, 2023
@fxprunayre fxprunayre modified the milestones: 4.4.2, 4.4.3 Jan 23, 2024
@fxprunayre fxprunayre modified the milestones: 4.4.3, 4.4.4 Mar 14, 2024
@fxprunayre fxprunayre modified the milestones: 4.4.4, 4.4.5 Apr 16, 2024
@tomkralidis
Copy link

@kalxas
Copy link

kalxas commented May 12, 2024

This issue was picked up by OWSLib CI which is failing recently with the above urls

@kalxas
Copy link

kalxas commented May 12, 2024

I was able to reproduce this issue on a local deployment with GeoNetwork 4.4.3

@KoalaGeo
Copy link
Contributor

We are seeing this issue in public deployments:

i.e. nextRecord is always zero, even though there are more records in the result set.

cc @kalxas @KoalaGeo

Cheers @tomkralidis for making the connection to the issue raised on gitter, and this existing issue.

Not sure what to do or where the fix is? Could maybe get our java team on it if you can point us in the right direction?

We've a number of stakeholders using this so looking for a quick fix...

@fxprunayre
Copy link
Member

If they are running 4.4.3, it has been fixed in 4.4.4 https://docs.geonetwork-opensource.org/4.4/overview/change-log/version-4.4.4/, #7937. It was related to Elasticsearch 8 migration.

@KoalaGeo
Copy link
Contributor

Yes 4.4.3, I'll upgrade to 4.4.4 today

@kalxas
Copy link

kalxas commented May 13, 2024

Thank you @fxprunayre
I will test again with 4.4.4

@KoalaGeo
Copy link
Contributor

Working for me in staging: https://hosted-metadata-uat.bgs.ac.uk/geonetwork/srv/eng/csw?request=GetRecords&service=CSW&version=2.0.2&maxrecords=10

GN: 4.4.4
PostgreSQL: 16.2
ES: 8.11.3
OGCAPI-Records: 4.4.3

Going to roll out to production

@kalxas
Copy link

kalxas commented May 13, 2024

It is now working for me as well.
Thanks for the release!

@juanluisrp
Copy link
Contributor

juanluisrp commented May 13, 2024

The pagination in the harvester console works at least in v4.2.9 and v4.4.4. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants