diff --git a/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java b/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java index 6e51565431..afcc273fbe 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/aliasstore/ESAliasStore.java @@ -214,13 +214,19 @@ private void personaPolicyToESDslClauses(List policies, } else if (getPolicyActions(policy).contains(ACCESS_READ_PERSONA_SUB_DOMAIN)) { for (String asset : assets) { //terms.add(asset); - allowClauseList.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/domain/*"))); + List> mustMap = new ArrayList<>(); + mustMap.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/domain/*"))); + mustMap.add(mapOf("term", mapOf("__typeName", "DataDomain"))); + allowClauseList.add(mapOf("bool", mapOf("must", mustMap))); } } else if (getPolicyActions(policy).contains(ACCESS_READ_PERSONA_PRODUCT)) { for (String asset : assets) { //terms.add(asset); - allowClauseList.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/*/product/*"))); + List> mustMap = new ArrayList<>(); + mustMap.add(mapOf("wildcard", mapOf(QUALIFIED_NAME, asset + "/*/product/*"))); + mustMap.add(mapOf("term", mapOf("__typeName", "DataProduct"))); + allowClauseList.add(mapOf("bool", mapOf("must", mustMap))); } } }