Commit 1c034cba by Pinal Shah Committed by nixonrodrigues

ATLAS-3788 : BasicSearch: Classification with System attribute(indexed) filters…

ATLAS-3788 : BasicSearch: Classification with System attribute(indexed) filters has pagination issue Signed-off-by: 's avatarnixonrodrigues <nixon@apache.org>
parent 103e867c
...@@ -21,12 +21,7 @@ import org.apache.atlas.SortOrder; ...@@ -21,12 +21,7 @@ import org.apache.atlas.SortOrder;
import org.apache.atlas.exception.AtlasBaseException; import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.discovery.SearchParameters.FilterCriteria; import org.apache.atlas.model.discovery.SearchParameters.FilterCriteria;
import org.apache.atlas.repository.Constants; import org.apache.atlas.repository.Constants;
import org.apache.atlas.repository.graphdb.AtlasEdge; import org.apache.atlas.repository.graphdb.*;
import org.apache.atlas.repository.graphdb.AtlasEdgeDirection;
import org.apache.atlas.repository.graphdb.AtlasGraph;
import org.apache.atlas.repository.graphdb.AtlasGraphQuery;
import org.apache.atlas.repository.graphdb.AtlasIndexQuery;
import org.apache.atlas.repository.graphdb.AtlasVertex;
import org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2; import org.apache.atlas.repository.store.graph.v2.AtlasGraphUtilsV2;
import org.apache.atlas.type.AtlasClassificationType; import org.apache.atlas.type.AtlasClassificationType;
import org.apache.atlas.util.AtlasGremlinQueryProvider; import org.apache.atlas.util.AtlasGremlinQueryProvider;
...@@ -44,10 +39,6 @@ import javax.script.ScriptEngine; ...@@ -44,10 +39,6 @@ import javax.script.ScriptEngine;
import javax.script.ScriptException; import javax.script.ScriptException;
import java.util.*; import java.util.*;
import static org.apache.atlas.discovery.SearchContext.MATCH_ALL_CLASSIFIED;
import static org.apache.atlas.discovery.SearchContext.MATCH_ALL_NOT_CLASSIFIED;
import static org.apache.atlas.discovery.SearchContext.MATCH_ALL_WILDCARD_CLASSIFICATION;
/** /**
* This class is needed when this is a registered classification type or wildcard search, * This class is needed when this is a registered classification type or wildcard search,
* registered classification includes special type as well. (tag filters will be ignored, and front-end should not enable * registered classification includes special type as well. (tag filters will be ignored, and front-end should not enable
...@@ -293,6 +284,8 @@ public class ClassificationSearchProcessor extends SearchProcessor { ...@@ -293,6 +284,8 @@ public class ClassificationSearchProcessor extends SearchProcessor {
getVerticesFromIndexQueryResult(queryResult, classificationVertices); getVerticesFromIndexQueryResult(queryResult, classificationVertices);
isLastResultPage = classificationVertices.size() < limit;
// Do in-memory filtering before the graph query // Do in-memory filtering before the graph query
CollectionUtils.filter(classificationVertices, inMemoryPredicate); CollectionUtils.filter(classificationVertices, inMemoryPredicate);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment