-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
seems that es expect resourceEdition to be a date #6842
Conversation
There was a problem hiding this 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:
core-geonetwork/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/index-fields/index.xsl
Lines 192 to 195 in b0d770e
<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?
Indeed, there is 2 differents things here:
So @cmangeat if you need to index |
Please add also to |
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 ? |
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 So maybe better for us to add in records.json:
|
2d99800
to
1afedab
Compare
@fxprunayre @josegar74 does this looks better please ? |
1afedab
to
3371ccf
Compare
"resourceEdition": { | ||
"type": "text" | ||
}, | ||
"standardVersion": { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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/*"> |
There was a problem hiding this comment.
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:
core-geonetwork/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/index-fields/index.xsl
Lines 393 to 395 in 2249440
<xsl:for-each select="cit:edition/*"> | |
<xsl:copy-of select="gn-fn-index:add-field('resourceEdition', .)"/> | |
</xsl:for-each> |
3371ccf
to
ad9bc70
Compare
replaced by better: #7506 |
No description provided.