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
204275cc
Commit
204275cc
authored
Apr 28, 2020
by
Damian Warszawski
Committed by
Madhan Neethiraj
Apr 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3760: optimize freetext search handling of excludeDeletedEntities flag
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
b4246817
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
FreeTextSearchProcessor.java
...a/org/apache/atlas/discovery/FreeTextSearchProcessor.java
+4
-7
No files found.
repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java
View file @
204275cc
...
...
@@ -57,6 +57,8 @@ public class FreeTextSearchProcessor extends SearchProcessor {
queryString
.
append
(
AND_STR
).
append
(
context
.
getEntityTypesQryStr
());
}
graphIndexQueryBuilder
.
addActiveStateQueryFilter
(
queryString
);
if
(
CollectionUtils
.
isNotEmpty
(
context
.
getClassificationTypes
())
&&
context
.
getClassificationTypesQryStr
().
length
()
<=
MAX_QUERY_STR_LENGTH_TYPES
)
{
queryString
.
append
(
AND_STR
).
append
(
context
.
getClassificationTypesQryStr
());
}
...
...
@@ -90,9 +92,8 @@ public class FreeTextSearchProcessor extends SearchProcessor {
}
try
{
final
int
startIdx
=
context
.
getSearchParameters
().
getOffset
();
final
int
limit
=
context
.
getSearchParameters
().
getLimit
();
final
boolean
activeOnly
=
context
.
getSearchParameters
().
getExcludeDeletedEntities
();
final
int
startIdx
=
context
.
getSearchParameters
().
getOffset
();
final
int
limit
=
context
.
getSearchParameters
().
getLimit
();
// query to start at 0, even though startIdx can be higher - because few results in earlier retrieval could
// have been dropped: like vertices of non-entity or non-active-entity
...
...
@@ -137,10 +138,6 @@ public class FreeTextSearchProcessor extends SearchProcessor {
continue
;
}
if
(
activeOnly
&&
AtlasGraphUtilsV2
.
getState
(
vertex
)
!=
AtlasEntity
.
Status
.
ACTIVE
)
{
continue
;
}
if
(
context
.
getClassificationType
()
!=
null
)
{
List
<
String
>
entityClassifications
=
GraphHelper
.
getAllTraitNames
(
vertex
);
...
...
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