Augmenter can't recursively resolve the schema (property/type pair) of the augmented properties.
Augmenter is supposed to be able to augment the properties from other augmented properties when updating schema mapping and creating the Document for Elasticsearch.
We illustrate the issue using the following examples:
CountryNames
from kind osdu:wks:master-data--GeoPoliticalEntity:1.
and WellUWI
from itself
Well has augmented properties {
"Name": "Well-IndexPropertyPathConfiguration",
"Description": "The index property list for master-data--Well:1., valid for all master-data--Well kinds for major version 1.",
"Code": "osdu:wks:master-data--Well:1.",
"AttributionAuthority": "OSDU",
"Configurations": [{
"Name": "CountryNames",
"Policy": "ExtractAllMatches",
"UseCase": "As a user I want to find objects by a country name, with the understanding that an object may extend over country boundaries.",
"Paths": [{
"RelatedObjectsSpec": {
"RelatedConditionProperty": "data.GeoContexts[].GeoTypeID",
"RelatedConditionMatches": [
"opendes:reference-data--GeoPoliticalEntityType:Country:"
],
"RelatedObjectID": "data.GeoContexts[].GeoPoliticalEntityID",
"RelatedObjectKind": "osdu:wks:master-data--GeoPoliticalEntity:1.",
"RelationshipDirection": "ChildToParent"
},
"ValueExtraction": {
"ValuePath": "data.GeoPoliticalEntityName"
}
}
]
}, {
"Name": "WellUWI",
"Policy": "ExtractFirstMatch",
"UseCase": "As a user I want to discover and match Wells by their UWI. I am aware that this is not globally reliable, however, I am able to specify a prioritized AliasNameType list to look up value in the NameAliases array.",
"Paths": [{
"ValueExtraction": {
"RelatedConditionProperty": "data.NameAliases[].AliasNameTypeID",
"RelatedConditionMatches": [
"opendes:reference-data--AliasNameType:UniqueIdentifier:",
"opendes:reference-data--AliasNameType:RegulatoryName:",
"opendes:reference-data--AliasNameType:PreferredName:"
],
"ValuePath": "data.NameAliases[].AliasName"
}
}
]
}
]
}
CountryNames
and WellUWI
from kind osdu:wks:master-data--osdu:wks:master-data--Wellbore:1.
Wellbore has augmented properties {
"Name": "Wellbore-IndexPropertyPathConfiguration",
"Description": "The index property list for master-data--Wellbore:1., valid for all master-data--Wellbore kinds for major version 1.",
"Code": "osdu:wks:master-data--Wellbore:1.",
"AttributionAuthority": "OSDU",
"Configurations": [{
"Name": "CountryNames",
"Policy": "ExtractFirstMatch",
"UseCase": "As a user I want to discover Wellbore instances by the well's name value.",
"Paths": [{
"RelatedObjectsSpec": {
"RelatedObjectID": "data.WellID",
"RelatedObjectKind": "osdu:wks:master-data--Well:1.",
"RelationshipDirection": "ChildToParent"
},
"ValueExtraction": {
"ValuePath": "data.CountryNames"
}
}
]
}, {
"Name": "WellUWI",
"Policy": "ExtractFirstMatch",
"UseCase": "As a user I want to discover Wellbore instances by the well's UWI value.",
"Paths": [{
"RelatedObjectsSpec": {
"RelatedObjectID": "data.WellID",
"RelatedObjectKind": "osdu:wks:master-data--Well:1.",
"RelationshipDirection": "ChildToParent"
},
"ValueExtraction": {
"ValuePath": "data.WellUWI"
}
}
]
}
]
}
When the indexer tries to resolve the schema for Wellbore
, the resolved schema should include both CountryNames
and WellUWI
.
However, in current implementation, the resolved schema for Wellbore
does not include augmented properties CountryNames
and WellUWI
. At the result, these two properties are not searchable though their values are created in the Wellbore
records.
Edited by Zhibin Mai