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
931d6efd
Commit
931d6efd
authored
Jun 08, 2020
by
Sarath Subramanian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-3826: Basic search not using index query for string tokenized attributes
parent
21b15842
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
AtlasEntityType.java
.../src/main/java/org/apache/atlas/type/AtlasEntityType.java
+2
-2
AtlasStructType.java
.../src/main/java/org/apache/atlas/type/AtlasStructType.java
+2
-2
SearchProcessor.java
...main/java/org/apache/atlas/discovery/SearchProcessor.java
+3
-3
RegistryBasedLookup.java
...main/java/org/apache/atlas/query/RegistryBasedLookup.java
+1
-1
AtlasGraphUtilsV2.java
...he/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
+1
-1
No files found.
intg/src/main/java/org/apache/atlas/type/AtlasEntityType.java
View file @
931d6efd
...
...
@@ -591,7 +591,7 @@ public class AtlasEntityType extends AtlasStructType {
return
relationshipAttributes
.
containsKey
(
attributeName
);
}
public
String
get
QualifiedAttribute
Name
(
String
attrName
)
throws
AtlasBaseException
{
public
String
get
VertexProperty
Name
(
String
attrName
)
throws
AtlasBaseException
{
AtlasAttribute
ret
=
getAttribute
(
attrName
);
if
(
ret
==
null
)
{
...
...
@@ -599,7 +599,7 @@ public class AtlasEntityType extends AtlasStructType {
}
if
(
ret
!=
null
)
{
return
ret
.
get
Qualified
Name
();
return
ret
.
get
VertexProperty
Name
();
}
throw
new
AtlasBaseException
(
AtlasErrorCode
.
UNKNOWN_ATTRIBUTE
,
attrName
,
entityDef
.
getName
());
...
...
intg/src/main/java/org/apache/atlas/type/AtlasStructType.java
View file @
931d6efd
...
...
@@ -652,11 +652,11 @@ public class AtlasStructType extends AtlasType {
return
null
;
}
public
String
get
QualifiedAttribute
Name
(
String
attrName
)
throws
AtlasBaseException
{
public
String
get
VertexProperty
Name
(
String
attrName
)
throws
AtlasBaseException
{
AtlasAttribute
attribute
=
getAttribute
(
attrName
);
if
(
attribute
!=
null
)
{
return
attribute
.
get
Qualified
Name
();
return
attribute
.
get
VertexProperty
Name
();
}
throw
new
AtlasBaseException
(
AtlasErrorCode
.
UNKNOWN_ATTRIBUTE
,
attrName
,
structDef
.
getName
());
...
...
repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java
View file @
931d6efd
...
...
@@ -270,7 +270,7 @@ public abstract class SearchProcessor {
if
(
isIndexSearchable
(
filterCriteria
,
structType
))
{
indexFiltered
.
add
(
attributeName
);
}
else
{
LOG
.
warn
(
"not using index-search for attribute '{}'; might cause poor performance"
,
structType
.
get
QualifiedAttribute
Name
(
attributeName
));
LOG
.
warn
(
"not using index-search for attribute '{}'; might cause poor performance"
,
structType
.
get
VertexProperty
Name
(
attributeName
));
graphFiltered
.
add
(
attributeName
);
}
...
...
@@ -437,7 +437,7 @@ public abstract class SearchProcessor {
}
private
boolean
isIndexSearchable
(
FilterCriteria
filterCriteria
,
AtlasStructType
structType
)
throws
AtlasBaseException
{
String
qualifiedName
=
structType
.
get
QualifiedAttribute
Name
(
filterCriteria
.
getAttributeName
());
String
qualifiedName
=
structType
.
get
VertexProperty
Name
(
filterCriteria
.
getAttributeName
());
Set
<
String
>
indexedKeys
=
context
.
getIndexedKeys
();
boolean
ret
=
indexedKeys
!=
null
&&
indexedKeys
.
contains
(
qualifiedName
);
...
...
@@ -588,7 +588,7 @@ public abstract class SearchProcessor {
try
{
if
(
OPERATOR_MAP
.
get
(
op
)
!=
null
)
{
String
qualifiedName
=
type
.
get
QualifiedAttribute
Name
(
attrName
);
String
qualifiedName
=
type
.
get
VertexProperty
Name
(
attrName
);
String
escapeIndexQueryValue
=
AtlasAttribute
.
escapeIndexQueryValue
(
attrVal
);
// map '__customAttributes' 'CONTAINS' operator to 'EQ' operator (solr limitation for json serialized string search)
...
...
repository/src/main/java/org/apache/atlas/query/RegistryBasedLookup.java
View file @
931d6efd
...
...
@@ -75,7 +75,7 @@ class RegistryBasedLookup implements Lookup {
return
""
;
}
return
et
.
get
QualifiedAttribute
Name
(
name
);
return
et
.
get
VertexProperty
Name
(
name
);
}
@Override
...
...
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java
View file @
931d6efd
...
...
@@ -619,7 +619,7 @@ public class AtlasGraphUtilsV2 {
if
(
ret
)
{
Set
<
String
>
indexSet
=
graph
.
getVertexIndexKeys
();
try
{
ret
=
indexSet
.
contains
(
entityType
.
get
QualifiedAttribute
Name
(
attributeName
));
ret
=
indexSet
.
contains
(
entityType
.
get
VertexProperty
Name
(
attributeName
));
}
catch
(
AtlasBaseException
ex
)
{
ret
=
false
;
...
...
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