egeria-connector-ibm-information-server icon indicating copy to clipboard operation
egeria-connector-ibm-information-server copied to clipboard

findEntities with multiple conditions does not return entities

Open marius-patrascu opened this issue 3 years ago • 1 comments

Hello, I am testing the findEntities method with multiple match conditions and have found a behaviour which I don't know if it's correct. I am searching for GlossaryTerm type and having as search condition the properties "displayName" and "name" with MatchCriteria.ANY. "displayName" is mapped for GlossaryTerm but the "name" property is not mapped.
While going through the code with the debugger I noticed that because the "name" property is not mapped it results in having the filter set to InstanceMapping.SearchFilter.NONE which means that no results are returned even though the "displayName" is mapped and there should be results matching that property. Also the filter for "displayName" is computed to InstanceMapping.SearchFilter.SOME.

Is this the correct behaviour? I would have expected to receive some results back matching the "displayName" property.

This is what the searchProperties look like:

primitivePropertyValue.setPrimitiveDefCategory(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING);
primitivePropertyValue.setPrimitiveValue("test");
primitivePropertyValue.setTypeName(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getName());
primitivePropertyValue.setTypeGUID(PrimitiveDefCategory.OM_PRIMITIVE_TYPE_STRING.getGUID());

namePropertyCondition.setProperty("name");
namePropertyCondition.setOperator(PropertyComparisonOperator.LIKE);
namePropertyCondition.setValue(primitivePropertyValue);

displayNamePropertyCondition.setProperty("displayName);
displayNamePropertyCondition.setOperator(PropertyComparisonOperator.LIKE);
displayNamePropertyCondition.setValue(primitivePropertyValue);

searchProperties.setConditions(Arrays.asList(displayNamePropertyCondition, namePropertyCondition));
searchProperties.setMatchCriteria(MatchCriteria.ANY);

marius-patrascu avatar Feb 24 '21 11:02 marius-patrascu