Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-24 Thread Madhan Neethiraj

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/#review219632
---


Ship it!




Ship It!

- Madhan Neethiraj


On Feb. 21, 2020, 5:24 a.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72127/
> ---
> 
> (Updated Feb. 21, 2020, 5:24 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3615
> https://issues.apache.org/jira/browse/ATLAS-3615
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Issues:
> 1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't 
> return result
> Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
> searched from solr but not from graphdb
> 
> 2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
> query(SearchByText) doesn't return result
> Why? result from solr, thru "/freetext" is correct, but onsearching if 
> resulted entitytype is in typeAndSubtypes of given entityType, it breaks 
> because typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]
> 
> 3) Combination of typeName, classification:_ALL_CLASSIFICATION_TYPES doesn't 
> return result
> 
> 4) Combination of typeName:_ALL_ENTITY_TYPES, 
> classification:_ALL_CLASSIFICATION_TYPES, query(SearchByText) doesn't return 
> correct result
> why? query formed with above combination in solr /freetext is 'SAMPLEQUERY' 
> AND [* TO *] AND [* TO *]
> 
> 5) Combination of classification:_ALL_CLASSIFICATION_TYPES and 
> classificationFilter doesn't return correct result
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
>  c0a5a46dd 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  b5606d046 
>   
> repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java
>  d628f1352 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 353411363 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 8c17a9044 
> 
> 
> Diff: https://reviews.apache.org/r/72127/diff/4/
> 
> 
> Testing
> ---
> 
> For issue1:
> 1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
> result fetches from gremlin and shows up correct result
> 2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches 
> from gremlin and shows up correct result
> 
> For issue2:
> 1) tested with values _ALL_ENTITY_TYPES + classification + 
> query(SearchByText) -> shows up correct result
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>



Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-20 Thread Sarath Subramanian

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/#review219623
---


Ship it!




Ship It!

- Sarath Subramanian


On Feb. 20, 2020, 9:24 p.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72127/
> ---
> 
> (Updated Feb. 20, 2020, 9:24 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3615
> https://issues.apache.org/jira/browse/ATLAS-3615
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Issues:
> 1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't 
> return result
> Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
> searched from solr but not from graphdb
> 
> 2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
> query(SearchByText) doesn't return result
> Why? result from solr, thru "/freetext" is correct, but onsearching if 
> resulted entitytype is in typeAndSubtypes of given entityType, it breaks 
> because typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]
> 
> 3) Combination of typeName, classification:_ALL_CLASSIFICATION_TYPES doesn't 
> return result
> 
> 4) Combination of typeName:_ALL_ENTITY_TYPES, 
> classification:_ALL_CLASSIFICATION_TYPES, query(SearchByText) doesn't return 
> correct result
> why? query formed with above combination in solr /freetext is 'SAMPLEQUERY' 
> AND [* TO *] AND [* TO *]
> 
> 5) Combination of classification:_ALL_CLASSIFICATION_TYPES and 
> classificationFilter doesn't return correct result
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
>  c0a5a46dd 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  b5606d046 
>   
> repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java
>  d628f1352 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 353411363 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 8c17a9044 
> 
> 
> Diff: https://reviews.apache.org/r/72127/diff/4/
> 
> 
> Testing
> ---
> 
> For issue1:
> 1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
> result fetches from gremlin and shows up correct result
> 2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches 
> from gremlin and shows up correct result
> 
> For issue2:
> 1) tested with values _ALL_ENTITY_TYPES + classification + 
> query(SearchByText) -> shows up correct result
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>



Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-20 Thread Pinal Shah

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/
---

(Updated Feb. 21, 2020, 5:24 a.m.)


Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
Subramanian.


Changes
---

removed empty line and combined if condition


Bugs: ATLAS-3615
https://issues.apache.org/jira/browse/ATLAS-3615


Repository: atlas


Description
---

Issues:
1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't return 
result
Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
searched from solr but not from graphdb

2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
query(SearchByText) doesn't return result
Why? result from solr, thru "/freetext" is correct, but onsearching if resulted 
entitytype is in typeAndSubtypes of given entityType, it breaks because 
typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]

3) Combination of typeName, classification:_ALL_CLASSIFICATION_TYPES doesn't 
return result

4) Combination of typeName:_ALL_ENTITY_TYPES, 
classification:_ALL_CLASSIFICATION_TYPES, query(SearchByText) doesn't return 
correct result
why? query formed with above combination in solr /freetext is 'SAMPLEQUERY' AND 
[* TO *] AND [* TO *]

5) Combination of classification:_ALL_CLASSIFICATION_TYPES and 
classificationFilter doesn't return correct result


Diffs (updated)
-

  
repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
 c0a5a46dd 
  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
b5606d046 
  
repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java
 d628f1352 
  repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
353411363 
  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
8c17a9044 


Diff: https://reviews.apache.org/r/72127/diff/4/

Changes: https://reviews.apache.org/r/72127/diff/3-4/


Testing
---

For issue1:
1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
result fetches from gremlin and shows up correct result
2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches from 
gremlin and shows up correct result

For issue2:
1) tested with values _ALL_ENTITY_TYPES + classification + query(SearchByText) 
-> shows up correct result


Thanks,

Pinal Shah



Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-20 Thread Sarath Subramanian

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/#review219622
---


Fix it, then Ship it!





repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
Line 148 (original), 149 (patched)


consider combining if condition in line 150 into 140:

if (!typeSearchByIndex && !isEntityRootType())



repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
Lines 349 (patched)


nit: remove new line


- Sarath Subramanian


On Feb. 18, 2020, 3:57 a.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72127/
> ---
> 
> (Updated Feb. 18, 2020, 3:57 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3615
> https://issues.apache.org/jira/browse/ATLAS-3615
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Issues:
> 1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't 
> return result
> Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
> searched from solr but not from graphdb
> 
> 2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
> query(SearchByText) doesn't return result
> Why? result from solr, thru "/freetext" is correct, but onsearching if 
> resulted entitytype is in typeAndSubtypes of given entityType, it breaks 
> because typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]
> 
> 3) Combination of typeName, classification:_ALL_CLASSIFICATION_TYPES doesn't 
> return result
> 
> 4) Combination of typeName:_ALL_ENTITY_TYPES, 
> classification:_ALL_CLASSIFICATION_TYPES, query(SearchByText) doesn't return 
> correct result
> why? query formed with above combination in solr /freetext is 'SAMPLEQUERY' 
> AND [* TO *] AND [* TO *]
> 
> 5) Combination of classification:_ALL_CLASSIFICATION_TYPES and 
> classificationFilter doesn't return correct result
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
>  c0a5a46dd 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  b5606d046 
>   
> repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java
>  d628f1352 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 353411363 
>   repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
> 8c17a9044 
> 
> 
> Diff: https://reviews.apache.org/r/72127/diff/3/
> 
> 
> Testing
> ---
> 
> For issue1:
> 1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
> result fetches from gremlin and shows up correct result
> 2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches 
> from gremlin and shows up correct result
> 
> For issue2:
> 1) tested with values _ALL_ENTITY_TYPES + classification + 
> query(SearchByText) -> shows up correct result
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>



Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-18 Thread Pinal Shah

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/
---

(Updated Feb. 18, 2020, 11:57 a.m.)


Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
Subramanian.


Changes
---

Changed typeAndSubTypes to emptySet


Bugs: ATLAS-3615
https://issues.apache.org/jira/browse/ATLAS-3615


Repository: atlas


Description (updated)
---

Issues:
1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't return 
result
Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
searched from solr but not from graphdb

2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
query(SearchByText) doesn't return result
Why? result from solr, thru "/freetext" is correct, but onsearching if resulted 
entitytype is in typeAndSubtypes of given entityType, it breaks because 
typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]

3) Combination of typeName, classification:_ALL_CLASSIFICATION_TYPES doesn't 
return result

4) Combination of typeName:_ALL_ENTITY_TYPES, 
classification:_ALL_CLASSIFICATION_TYPES, query(SearchByText) doesn't return 
correct result
why? query formed with above combination in solr /freetext is 'SAMPLEQUERY' AND 
[* TO *] AND [* TO *]

5) Combination of classification:_ALL_CLASSIFICATION_TYPES and 
classificationFilter doesn't return correct result


Diffs (updated)
-

  
repository/src/main/java/org/apache/atlas/discovery/ClassificationSearchProcessor.java
 c0a5a46dd 
  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
b5606d046 
  
repository/src/main/java/org/apache/atlas/discovery/FreeTextSearchProcessor.java
 d628f1352 
  repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
353411363 
  repository/src/main/java/org/apache/atlas/discovery/SearchProcessor.java 
8c17a9044 


Diff: https://reviews.apache.org/r/72127/diff/3/

Changes: https://reviews.apache.org/r/72127/diff/2-3/


Testing
---

For issue1:
1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
result fetches from gremlin and shows up correct result
2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches from 
gremlin and shows up correct result

For issue2:
1) tested with values _ALL_ENTITY_TYPES + classification + query(SearchByText) 
-> shows up correct result


Thanks,

Pinal Shah



Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-13 Thread Madhan Neethiraj

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/#review219573
---




repository/src/main/java/org/apache/atlas/discovery/SearchContext.java
Line 199 (original), 199 (patched)


Please review if assigning 'typeAndSubTypes' (in #136 - for 
MATCH_ALL_ENTITY_TYPES) an empty-set would resolve this issue. With this 
update, no changes should be needed in includeEntityType() method.

Similarly for 'classificationTypeAndSubTypes' (in #123 - for 
MATCH_ALL_CLASSIFICATION_TYPES).

Currently both are assigned SearchProcessor.ALL_TYPE_QUERY (i.e. "[* TO 
*]"), which doesn't seem correct.


- Madhan Neethiraj


On Feb. 13, 2020, 9:49 a.m., Pinal Shah wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72127/
> ---
> 
> (Updated Feb. 13, 2020, 9:49 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
> Subramanian.
> 
> 
> Bugs: ATLAS-3615
> https://issues.apache.org/jira/browse/ATLAS-3615
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> Issues:
> 1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't 
> return result
> Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
> searched from solr but not from graphdb
> 2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
> query(SearchByText) doesn't return result
> Why? result from solr, thru "/freetext" is correct, but onsearching if 
> resulted entitytype is in typeAndSubtypes of given entityType, it breaks 
> because typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]
> 
> 
> Diffs
> -
> 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java
>  b5606d046 
>   repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
> 353411363 
> 
> 
> Diff: https://reviews.apache.org/r/72127/diff/2/
> 
> 
> Testing
> ---
> 
> For issue1:
> 1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
> result fetches from gremlin and shows up correct result
> 2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches 
> from gremlin and shows up correct result
> 
> For issue2:
> 1) tested with values _ALL_ENTITY_TYPES + classification + 
> query(SearchByText) -> shows up correct result
> 
> 
> Thanks,
> 
> Pinal Shah
> 
>



Re: Review Request 72127: ATLAS-3615 :- Basic Search : Search with _ALL_ENTITY_TYPES and classification doesn't not fetch any entity associated to that classification

2020-02-13 Thread Pinal Shah

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72127/
---

(Updated Feb. 13, 2020, 9:49 a.m.)


Review request for atlas, Madhan Neethiraj, Nixon Rodrigues, and Sarath 
Subramanian.


Bugs: ATLAS-3615
https://issues.apache.org/jira/browse/ATLAS-3615


Repository: atlas


Description
---

Issues:
1) Combination of typeName:_ALL_ENTITY_TYPES and classification doesn't return 
result
Why? As _ALL_ENTITY_TYPES value is assigned as [* TO *] results show up when 
searched from solr but not from graphdb
2) Combination of typeName:_ALL_ENTITY_TYPES, classification, 
query(SearchByText) doesn't return result
Why? result from solr, thru "/freetext" is correct, but onsearching if resulted 
entitytype is in typeAndSubtypes of given entityType, it breaks because 
typeAndSubTypes of _ALL_ENTITY_TYPES is [* TO *]


Diffs (updated)
-

  
repository/src/main/java/org/apache/atlas/discovery/EntitySearchProcessor.java 
b5606d046 
  repository/src/main/java/org/apache/atlas/discovery/SearchContext.java 
353411363 


Diff: https://reviews.apache.org/r/72127/diff/2/

Changes: https://reviews.apache.org/r/72127/diff/1-2/


Testing
---

For issue1:
1) tested with values _ALL_ENTITY_TYPES + EntityFilter + classification -> 
result fetches from gremlin and shows up correct result
2) tested with values _ALL_ENTITY_TYPES + classification -> result fetches from 
gremlin and shows up correct result

For issue2:
1) tested with values _ALL_ENTITY_TYPES + classification + query(SearchByText) 
-> shows up correct result


Thanks,

Pinal Shah