Question
Can we do a search for just the Year of birth in the Date of Birth attribute? If yes, would you please send a query of what that might look like? Using the following API https://docs.reltio.com/entitiesapi/searchentity.html
Answer
The birthDate is defined as a Date.
{
"label": "Date of Birth",
"name": "birthDate",
"description": "Date of Birth",
"type": "Date",
"hidden": false,
"important": false,
"system": false,
"required": false,
"faceted": true,
"searchable": true,
"attributeOrdering": {
"orderingStrategy": "LUD"
},
"uri": "configuration/entityTypes/person/attributes/birthDate",
"skipInDataAccess": false
}
The safest and most efficient way to find all occurrences of the year 1980 would be to find all person entityType where the birthYear is 1980, you need to specify a time range filter from 1 Jan till 31 Dec 1980.
"filter": "(equals(type,'configuration/entityTypes/person') AND
range(attributes.birthDate, '315532800000', '347068800000'))"
If an attribute is defined as a string, the following filter would work to find a specific selection. For more information regarding filters please refer to this link.
"filter": "(equals(type,'configuration/entityTypes/person') AND
startsWith(attributes.<attributedDefinedAsString>, '<a string constant>'))"
Comments
Please sign in to leave a comment.