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

madhan 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 9e328ed  ATLAS-3850: regression - search results don't include 
glossary-term associations
9e328ed is described below

commit 9e328edaaaa31d928214e25915d10425dd375af1
Author: Pinal Shah <[email protected]>
AuthorDate: Tue Jun 23 17:16:06 2020 +0530

    ATLAS-3850: regression - search results don't include glossary-term 
associations
    
    Signed-off-by: Madhan Neethiraj <[email protected]>
    (cherry picked from commit 992b8b47cc332efe71f82c5ecbbee94d3e2774e5)
---
 .../apache/atlas/repository/graph/GraphBackedSearchIndexer.java  | 9 +--------
 .../atlas/repository/store/graph/v2/EntityGraphRetriever.java    | 2 +-
 test-tools/src/main/resources/solr/core-template/solrconfig.xml  | 2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)

diff --git 
a/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
 
b/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
index 379a912..4a4fa69 100755
--- 
a/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java
@@ -30,7 +30,6 @@ import org.apache.atlas.listener.ActiveStateChangeHandler;
 import org.apache.atlas.listener.ChangedTypeDefs;
 import org.apache.atlas.listener.TypeDefChangeListener;
 import org.apache.atlas.model.TypeCategory;
-import org.apache.atlas.model.instance.AtlasEntity;
 import org.apache.atlas.model.typedef.AtlasBaseTypeDef;
 import org.apache.atlas.model.typedef.AtlasEntityDef;
 import org.apache.atlas.model.typedef.AtlasEnumDef;
@@ -44,16 +43,13 @@ import org.apache.atlas.repository.graphdb.*;
 import org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2;
 import org.apache.atlas.type.*;
 import org.apache.atlas.type.AtlasStructType.AtlasAttribute;
-import org.apache.atlas.type.AtlasType;
-import org.apache.atlas.type.AtlasTypeRegistry;
-import org.apache.atlas.type.AtlasTypeUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.configuration.Configuration;
 import org.apache.solr.common.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
 import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
 
 import javax.inject.Inject;
 import java.math.BigDecimal;
@@ -364,9 +360,6 @@ public class GraphBackedSearchIndexer implements 
SearchIndexer, ActiveStateChang
             createPropertyKey(management, PROVENANCE_TYPE_KEY, Integer.class, 
SINGLE);
             createPropertyKey(management, HOME_ID_KEY, String.class, SINGLE);
 
-            createEdgeLabel(management, Constants.TERM_ASSIGNMENT_LABEL);
-            createEdgeLabel(management, Constants.CLASSIFICATION_LABEL);
-
             commit(management);
 
             LOG.info("Index creation for global keys complete.");
diff --git 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
index 757fcb1..863a003 100644
--- 
a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
+++ 
b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
@@ -835,7 +835,7 @@ public class EntityGraphRetriever {
     public List<AtlasTermAssignmentHeader> mapAssignedTerms(AtlasVertex 
entityVertex) {
         List<AtlasTermAssignmentHeader> ret = new ArrayList<>();
 
-        Iterable edges = 
entityVertex.query().direction(AtlasEdgeDirection.IN).label(Constants.INTERNAL_PROPERTY_KEY_PREFIX
 + TERM_ASSIGNMENT_LABEL).edges();
+        Iterable edges = 
entityVertex.query().direction(AtlasEdgeDirection.IN).label(TERM_ASSIGNMENT_LABEL).edges();
 
         if (edges != null) {
             for (final AtlasEdge edge : (Iterable<AtlasEdge>) edges) {
diff --git a/test-tools/src/main/resources/solr/core-template/solrconfig.xml 
b/test-tools/src/main/resources/solr/core-template/solrconfig.xml
index ef74a0a..39cc6ab 100644
--- a/test-tools/src/main/resources/solr/core-template/solrconfig.xml
+++ b/test-tools/src/main/resources/solr/core-template/solrconfig.xml
@@ -434,7 +434,7 @@
           -->
         <lst name="defaults">
             <str name="defType">edismax</str>
-            <str name="qf">7shx_t^3 7qx1_t^3 3pj9_t^3 7cp1_t^3 43r9_t^3 
cn9_t^1 79j9_t^3 3vut_t^3 3thh_t^3 3qbp_s^3 7wg5_t^3 7b45_t^3 3nyd_s^3 7vnp_t^3 
7rph_t^3 8ydh_t^3 x6t_t^3 7tad_t^3 7jt1_t^3 3mdh_s^3 7e9x_t^3 3rwl_s^3 93wl_t^3 
yrp_t^10 7pc5_t^3 7u2t_t^3 3xfp_t^3 426d_t^3 iyt_t^10 3g1x_t^3 40lh_t^3</str>
+            <str name="qf">3eh1_t^3 yrp_t^10 m4l_t^10 kjp_t^10 iyt_t^10 
cn9_t^1 x6t_t^3 hdx_t^3 3ksl_s^3 3qbp_s^3 3mdh_s^3 3oqt_s^3 3nyd_t^3 7uv9_t^3 
7ldx_t^3</str>
             <str name="hl.fl">*</str>
             <bool name="hl.requireFieldMatch">true</bool>
             <bool name="lowercaseOperators">true</bool>

Reply via email to