Commit 0c979028 by Madhan Neethiraj

ATLAS-1630: basic search performance improvement (#3)

parent 7154e12d
...@@ -247,18 +247,18 @@ public class EntityDiscoveryService implements AtlasDiscoveryService { ...@@ -247,18 +247,18 @@ public class EntityDiscoveryService implements AtlasDiscoveryService {
final Map<String, Object> bindings = new HashMap<>(); final Map<String, Object> bindings = new HashMap<>();
String basicQuery = "g.V()"; String basicQuery = "g.V()";
if (typeNames != null) {
bindings.put("typeNames", typeNames);
basicQuery += gremlinQueryProvider.getQuery(AtlasGremlinQuery.BASIC_SEARCH_TYPE_FILTER);
}
if (classificationNames != null) { if (classificationNames != null) {
bindings.put("traitNames", classificationNames); bindings.put("traitNames", classificationNames);
basicQuery += gremlinQueryProvider.getQuery(AtlasGremlinQuery.BASIC_SEARCH_CLASSIFICATION_FILTER); basicQuery += gremlinQueryProvider.getQuery(AtlasGremlinQuery.BASIC_SEARCH_CLASSIFICATION_FILTER);
} }
if (typeNames != null) {
bindings.put("typeNames", typeNames);
basicQuery += gremlinQueryProvider.getQuery(AtlasGremlinQuery.BASIC_SEARCH_TYPE_FILTER);
}
bindings.put("startIdx", params.offset()); bindings.put("startIdx", params.offset());
bindings.put("endIdx", params.offset() + params.limit()); bindings.put("endIdx", params.offset() + params.limit());
......
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