Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
2c86bcac
Commit
2c86bcac
authored
5 years ago
by
Pinal Shah
Committed by
Madhan Neethiraj
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3650: fixed incorrect results from basic-search for types having large number of sub-types
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
3d0c9877
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
EntitySearchProcessor.java
...ava/org/apache/atlas/discovery/EntitySearchProcessor.java
+3
-8
No files found.
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
View file @
2c86bcac
...
@@ -107,22 +107,19 @@ public class EntitySearchProcessor extends SearchProcessor {
...
@@ -107,22 +107,19 @@ public class EntitySearchProcessor extends SearchProcessor {
StringBuilder
indexQuery
=
new
StringBuilder
();
StringBuilder
indexQuery
=
new
StringBuilder
();
if
(
typeSearchByIndex
)
{
graphIndexQueryBuilder
.
addTypeAndSubTypesQueryFilter
(
indexQuery
,
typeAndSubTypesQryStr
);
// TypeName check to be done in-memory as well to address ATLAS-2121 (case sensitivity)
// TypeName check to be done in-memory as well to address ATLAS-2121 (case sensitivity)
inMemoryPredicate
=
typeNamePredicate
;
inMemoryPredicate
=
typeNamePredicate
;
if
(
typeSearchByIndex
)
{
graphIndexQueryBuilder
.
addTypeAndSubTypesQueryFilter
(
indexQuery
,
typeAndSubTypesQryStr
);
}
}
if
(
attrSearchByIndex
)
{
if
(
attrSearchByIndex
)
{
constructFilterQuery
(
indexQuery
,
entityType
,
filterCriteria
,
indexAttributes
);
constructFilterQuery
(
indexQuery
,
entityType
,
filterCriteria
,
indexAttributes
);
Predicate
attributePredicate
=
constructInMemoryPredicate
(
entityType
,
filterCriteria
,
indexAttributes
);
Predicate
attributePredicate
=
constructInMemoryPredicate
(
entityType
,
filterCriteria
,
indexAttributes
);
if
(
inMemory
Predicate
!=
null
)
{
if
(
attribute
Predicate
!=
null
)
{
inMemoryPredicate
=
PredicateUtils
.
andPredicate
(
inMemoryPredicate
,
attributePredicate
);
inMemoryPredicate
=
PredicateUtils
.
andPredicate
(
inMemoryPredicate
,
attributePredicate
);
}
else
{
inMemoryPredicate
=
attributePredicate
;
}
}
}
else
{
}
else
{
graphAttributes
.
addAll
(
indexAttributes
);
graphAttributes
.
addAll
(
indexAttributes
);
...
@@ -314,9 +311,7 @@ public class EntitySearchProcessor extends SearchProcessor {
...
@@ -314,9 +311,7 @@ public class EntitySearchProcessor extends SearchProcessor {
isLastResultPage
=
entityVertices
.
size
()
<
limit
;
isLastResultPage
=
entityVertices
.
size
()
<
limit
;
// Do in-memory filtering
// Do in-memory filtering
if
(
inMemoryPredicate
!=
null
)
{
CollectionUtils
.
filter
(
entityVertices
,
inMemoryPredicate
);
CollectionUtils
.
filter
(
entityVertices
,
inMemoryPredicate
);
}
//incase when operator is NEQ in pipeSeperatedSystemAttributes
//incase when operator is NEQ in pipeSeperatedSystemAttributes
if
(
graphQueryPredicate
!=
null
)
{
if
(
graphQueryPredicate
!=
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment