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

Upgrade to ElasticSearch 8.14 client doesn't work with previous versions of Elasticsearch server 8.X or 7.X #8305

Open
josegar74 opened this issue Aug 22, 2024 · 5 comments
Labels
Milestone

Comments

@josegar74
Copy link
Member

Describe the bug

After the upgrade to Elasticsearch 8.14 client in #8161, the application doesn't work with previous versions of Elasticsearch server 8.X or 7.X as with the previous client version.

Probably needs some update the records.json for the fields definition. But it's unclear yet.

Until this issue is fixed to work fine or reverted the client version to the previous version, 4.4.6 can't be released.

To Reproduce
Steps to reproduce the behavior:

  1. Start ElasticSearch 8.13
  2. Start GeoNetwork main branch
  3. Login as administrator and try to load the sample metadata
  4. See error in the application log

Expected behavior
It works fine with previous versions of Elasticsearch server 8.X or 7.X as with the previous client version.

@josegar74 josegar74 added the bug label Aug 22, 2024
@josegar74 josegar74 added this to the 4.4.6 milestone Aug 22, 2024
@fxprunayre
Copy link
Member

fxprunayre commented Sep 2, 2024

Error is

[2024-09-02T17:45:30,923][INFO ][o.e.c.m.MetadataCreateIndexService] [icho]
 failed on parsing mappings on index creation [sextant-records]
org.elasticsearch.index.mapper.MapperParsingException: Failed to parse mapping: 
No field type matched on [[object]], 
possible values are [object, string, long, double, boolean, date, binary]
	at org.elasticsearch.server@8.11.3/org.elasticsearch.index.mapper.MapperService.parseMapping(MapperService.java:555)
	at org.elasticsearch.server@8.11.3/org.elasticsearch.index.mapper.MapperService.doMerge(MapperService.java:517)
	at org.elasticsearch.server@8.11.3/org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:404)
	at org.elasticsearch.server@8.11.3/org.elasticsearch.cluster.metadata.MetadataCreateIndexService.updateIndexMappingsAndBuildSortOrder(MetadataCreateIndexService.java:1340)
	at org.elasticsearch.server@8.11.3/org.elasticsearch.cluster.metadata.MetadataCreateIndexService.lambda$applyCreateIndexWithTemporaryService$2(MetadataCreateIndexService.java:472)

@fxprunayre
Copy link
Member

It is related to https://github.com/geonetwork/core-geonetwork/blob/main/web/src/main/webResources/WEB-INF/data/config/index/records.json#L1364

Removing match_mapping_type make index creation to work. Do you remember why we added it ?
Can't find any similar issue and error message is not that much explicit - I don't see why it could be an array of object.

@josegar74
Copy link
Member Author

josegar74 commented Sep 3, 2024

I don't remember, but it probably matched other types of data in some cases and I added that to force the match.

Indeed it's really bizarre that tries to match an array of objects, have you check with Kibana the content of the field?

@fxprunayre
Copy link
Member

I've been testing on large index (28k records) without issue so far. You can give a try on NGR and see if the issue happens?

@josegar74
Copy link
Member Author

I'll do some additional checks locally, thanks.

@josegar74 josegar74 modified the milestones: 4.4.6, 4.4.7 Oct 25, 2024
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

2 participants