Commit 2c86bcac by Pinal Shah Committed by Madhan Neethiraj

ATLAS-3650: fixed incorrect results from basic-search for types having large number of sub-types

parent 3d0c9877
......@@ -107,22 +107,19 @@ public class EntitySearchProcessor extends SearchProcessor {
StringBuilder indexQuery = new StringBuilder();
// TypeName check to be done in-memory as well to address ATLAS-2121 (case sensitivity)
inMemoryPredicate = typeNamePredicate;
if (typeSearchByIndex) {
graphIndexQueryBuilder.addTypeAndSubTypesQueryFilter(indexQuery, typeAndSubTypesQryStr);
// TypeName check to be done in-memory as well to address ATLAS-2121 (case sensitivity)
inMemoryPredicate = typeNamePredicate;
}
if (attrSearchByIndex) {
constructFilterQuery(indexQuery, entityType, filterCriteria, indexAttributes);
Predicate attributePredicate = constructInMemoryPredicate(entityType, filterCriteria, indexAttributes);
if (inMemoryPredicate != null) {
if (attributePredicate != null) {
inMemoryPredicate = PredicateUtils.andPredicate(inMemoryPredicate, attributePredicate);
} else {
inMemoryPredicate = attributePredicate;
}
} else {
graphAttributes.addAll(indexAttributes);
......@@ -314,9 +311,7 @@ public class EntitySearchProcessor extends SearchProcessor {
isLastResultPage = entityVertices.size() < limit;
// Do in-memory filtering
if (inMemoryPredicate != null) {
CollectionUtils.filter(entityVertices, inMemoryPredicate);
}
CollectionUtils.filter(entityVertices, inMemoryPredicate);
//incase when operator is NEQ in pipeSeperatedSystemAttributes
if (graphQueryPredicate != null) {
......
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