This is an automated email from the ASF dual-hosted git repository.

sarath pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 7604c6d  ATLAS-3826: Basic search not using index query for string 
tokenized attributes
7604c6d is described below

commit 7604c6d09927146a70964a429e588419fc06d640
Author: Sarath Subramanian <[email protected]>
AuthorDate: Mon Jun 8 15:47:38 2020 -0700

    ATLAS-3826: Basic search not using index query for string tokenized 
attributes
    
    (cherry picked from commit 931d6efdc97f742370df334761673af70f240837)
---
 intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java       | 4 ++--
 intg/src/main/java/org/apache/atlas/type/AtlasStructType.java       | 4 ++--
 .../src/main/java/org/apache/atlas/discovery/SearchProcessor.java   | 6 +++---
 .../src/main/java/org/apache/atlas/query/RegistryBasedLookup.java   | 2 +-
 .../apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java   | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java 
b/intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
index 3962c3c..58de4cc 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
@@ -591,7 +591,7 @@ public class AtlasEntityType extends AtlasStructType {
         return relationshipAttributes.containsKey(attributeName);
     }
 
-    public String getQualifiedAttributeName(String attrName) throws 
AtlasBaseException {
+    public String getVertexPropertyName(String attrName) throws 
AtlasBaseException {
         AtlasAttribute ret = getAttribute(attrName);
 
         if (ret == null) {
@@ -599,7 +599,7 @@ public class AtlasEntityType extends AtlasStructType {
         }
 
         if (ret != null) {
-            return ret.getQualifiedName();
+            return ret.getVertexPropertyName();
         }
 
         throw new AtlasBaseException(AtlasErrorCode.UNKNOWN_ATTRIBUTE, 
attrName, entityDef.getName());
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasStructType.java 
b/intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
index 4b0027e..61ee458 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
@@ -652,11 +652,11 @@ public class AtlasStructType extends AtlasType {
         return null;
     }
 
-    public String getQualifiedAttributeName(String attrName) throws 
AtlasBaseException {
+    public String getVertexPropertyName(String attrName) throws 
AtlasBaseException {
         AtlasAttribute attribute = getAttribute(attrName);
 
         if (attribute != null) {
-            return attribute.getQualifiedName();
+            return attribute.getVertexPropertyName();
         }
 
         throw new AtlasBaseException(AtlasErrorCode.UNKNOWN_ATTRIBUTE, 
attrName, structDef.getName());
diff --git 
a/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
b/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
index 2c5f925..ad48be1 100644
--- a/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
+++ b/repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
@@ -270,7 +270,7 @@ public abstract class SearchProcessor {
                 if (isIndexSearchable(filterCriteria, structType)) {
                     indexFiltered.add(attributeName);
                 } else {
-                    LOG.warn("not using index-search for attribute '{}'; might 
cause poor performance", structType.getQualifiedAttributeName(attributeName));
+                    LOG.warn("not using index-search for attribute '{}'; might 
cause poor performance", structType.getVertexPropertyName(attributeName));
 
                     graphFiltered.add(attributeName);
                 }
@@ -437,7 +437,7 @@ public abstract class SearchProcessor {
     }
 
     private boolean isIndexSearchable(FilterCriteria filterCriteria, 
AtlasStructType structType) throws AtlasBaseException {
-        String      qualifiedName = 
structType.getQualifiedAttributeName(filterCriteria.getAttributeName());
+        String      qualifiedName = 
structType.getVertexPropertyName(filterCriteria.getAttributeName());
         Set<String> indexedKeys   = context.getIndexedKeys();
         boolean     ret           = indexedKeys != null && 
indexedKeys.contains(qualifiedName);
 
@@ -588,7 +588,7 @@ public abstract class SearchProcessor {
 
         try {
             if (OPERATOR_MAP.get(op) != null) {
-                String qualifiedName         = 
type.getQualifiedAttributeName(attrName);
+                String qualifiedName         = 
type.getVertexPropertyName(attrName);
                 String escapeIndexQueryValue = 
AtlasAttribute.escapeIndexQueryValue(attrVal);
 
                 // map '__customAttributes' 'CONTAINS' operator to 'EQ' 
operator (solr limitation for json serialized string search)
diff --git 
a/repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java 
b/repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java
index d536900..587a099 100644
--- a/repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java
+++ b/repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java
@@ -75,7 +75,7 @@ class RegistryBasedLookup implements Lookup {
             return "";
         }
 
-        return et.getQualifiedAttributeName(name);
+        return et.getVertexPropertyName(name);
     }
 
     @Override
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
index fc5d48d..b2be41c 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
@@ -619,7 +619,7 @@ public class AtlasGraphUtilsV2 {
             if (ret) {
                 Set<String> indexSet = graph.getVertexIndexKeys();
                 try {
-                    ret = 
indexSet.contains(entityType.getQualifiedAttributeName(attributeName));
+                    ret = 
indexSet.contains(entityType.getVertexPropertyName(attributeName));
                 }
                 catch (AtlasBaseException ex) {
                     ret = false;

Reply via email to