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

Explicitly set a tolerant ES type for resourceEdition, resourceEditionDate and standardVersion #7506

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

sebr72
Copy link
Contributor

@sebr72 sebr72 commented Nov 22, 2023

This PR is a rework from PR: #6842
It allows us to avoid setting the logic in each schema index.xsl files.

When ES indexes a md, it sets the type for each field based on the value of that field that was not yet indexed. This dynamic mapping only occurs for the fields whose type has not been defined explicitly.
This PR intends to:

  • avoid resourceEdition to be inferred as a date
  • avoid malformed resourceEditionDate to prevent the indexation of the entire md
  • avoid standardVersion to be inferred as a decimal

To test this PR:

  • insert md1 with a resourceEdition as a date followed by md2 with a resourceEdition as text
  • insert md1 with a resourceEditionDate as a date followed by md2 with a resourceEditionDate as text
  • insert md1 with a standardVersion as a decimal followed by md2 with a standardVersion as text
  • Check md2 is indexed, index might need to be cleared bedore md1 insertion.

Checklist

  • I have read the [contribution guidelines](https://github.com/geonetwork/core-geonetwork/blob/main/CONTRIBUTING.md
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests)
  • User documentation provided for new features or enhancements in mannual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@sebr72 sebr72 force-pushed the es_types_for_resourceEdition_and_resourceEditionDate branch from 8214473 to 1956d23 Compare November 22, 2023 12:34
@josegar74 josegar74 added this to the 4.4.2 milestone Nov 22, 2023
@sebr72 sebr72 force-pushed the es_types_for_resourceEdition_and_resourceEditionDate branch from 1435543 to 31ddf16 Compare November 29, 2023 16:53
@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 13, 2024
@fxprunayre fxprunayre modified the milestones: 4.4.4, 4.4.5 Apr 16, 2024
@fxprunayre fxprunayre modified the milestones: 4.4.5, 4.4.6 Jun 4, 2024
@fxprunayre fxprunayre modified the milestones: 4.4.6, 4.4.7 Oct 15, 2024
@CLAassistant
Copy link

CLAassistant commented Dec 8, 2024

CLA assistant check
All committers have signed the CLA.

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

Successfully merging this pull request may close these issues.

4 participants