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

seems that es expect resourceEdition to be a date #6842

Conversation

cmangeat
Copy link
Collaborator

No description provided.

Copy link
Member

@josegar74 josegar74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have clear the change, as it's removing the indexing of gmd:edition and storing in the same ES field the content of gmd:editionDate.

Should not be better to index both fields in different ES fields?

Also in ISO19115-3, the indexing looks analog as the original code for ISO19139:

<xsl:for-each select="../cit:edition/*">
<xsl:copy-of select="gn-fn-index:add-multilingual-field('standardVersion', ., $allLanguages)"/>
</xsl:for-each>
</xsl:for-each>

@fxprunayre what do you think?

@fxprunayre
Copy link
Member

Indeed, there is 2 differents things here:

  • edition which is text
  • editionDate which is a date

image

So @cmangeat if you need to index editionDate, add a new field no?

@fxprunayre fxprunayre added this to the 4.2.3 milestone Feb 20, 2023
@josegar74
Copy link
Member

Please add also to ISO19115-3 schema the analog change.

@cmangeat
Copy link
Collaborator Author

cmangeat commented Feb 21, 2023

Indeed, there is 2 differents things here:

* `edition` which is text

* `editionDate` which is a date

image

So @cmangeat if you need to index editionDate, add a new field no?

Point is that when I query my index(, built from records.json ?), resourceEdition is a date. I do not know where it come from. Any hint ?
resourceEdition

@fxprunayre
Copy link
Member

. I do not know where it come from. Any hint ?

You probably have one record which contains an edition which looks like a date and Elastic building the mapping dynamically from the input, it creates a field resourceEdition with a date type as we don't declare it in our schema.

So maybe better for us to add in records.json:

  • resourceEdition type keyword
  • resourceEditionDate type date
    and add the date indexing in ISO19139 and 115-3

@cmangeat cmangeat force-pushed the geocat_v4.2.3_es_expect_resourceEdition_to_be_a_date branch 2 times, most recently from 2d99800 to 1afedab Compare March 3, 2023 10:11
@cmangeat
Copy link
Collaborator Author

cmangeat commented Mar 3, 2023

@fxprunayre @josegar74 does this looks better please ?

@cmangeat cmangeat force-pushed the geocat_v4.2.3_es_expect_resourceEdition_to_be_a_date branch from 1afedab to 3371ccf Compare March 3, 2023 10:49
@fxprunayre fxprunayre modified the milestones: 4.2.3, 4.2.4 Mar 7, 2023
"resourceEdition": {
"type": "text"
},
"standardVersion": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's required for standardVersion, but I guess doesn't cause trouble.

Copy link
Collaborator Author

@cmangeat cmangeat Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the first indexed md carries a version such as "1.1", if version is not explicitly defined as text, it could be inferred as decimal.

@@ -344,6 +344,12 @@
<xsl:for-each select="gmd:edition/*">
<xsl:copy-of select="gn-fn-index:add-field('resourceEdition', .)"/>
</xsl:for-each>

<xsl:for-each select="gmd:editionDate/*">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a similar change in ISO19115-3.2008?

You can the following snippet:

<xsl:for-each select="cit:editionDate/*"> 
  <xsl:if  test="current() castable as xs:date or current() castable as xs:dateTime">
    <xsl:copy-of select="gn-fn-index:add-field('resourceEditionDate', .)"/>
  </xsl:if>
</xsl:for-each> 

below:

<xsl:for-each select="cit:edition/*">
<xsl:copy-of select="gn-fn-index:add-field('resourceEdition', .)"/>
</xsl:for-each>

@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 5, 2023
@fxprunayre fxprunayre modified the milestones: 4.2.6, 4.4.1 Oct 4, 2023
@cmangeat cmangeat force-pushed the geocat_v4.2.3_es_expect_resourceEdition_to_be_a_date branch from 3371ccf to ad9bc70 Compare November 20, 2023 16:52
@cmangeat cmangeat marked this pull request as draft November 20, 2023 17:01
@josegar74 josegar74 modified the milestones: 4.4.1, 4.4.2 Nov 22, 2023
@cmangeat cmangeat closed this Nov 22, 2023
@cmangeat
Copy link
Collaborator Author

replaced by better: #7506

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

Successfully merging this pull request may close these issues.

3 participants