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


Fix it, then Ship it!





repository/src/main/java/org/apache/atlas/discovery/SuggestionsProviderImpl.java
Lines 48 (patched)
<https://reviews.apache.org/r/71738/#comment306312>

    Consider handing fieldName==null here, with:
      String indexFieldName = (fieldName == null) ? null : 
typeRegistry.getIndexFieldName(fieldName);


- Madhan Neethiraj


On Nov. 8, 2019, 3:35 a.m., Sarath Subramanian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71738/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2019, 3:35 a.m.)
> 
> 
> Review request for atlas, Ashutosh Mestry, Aadarsh Jajodia, Sridhar K, Le Ma, 
> Madhan Neethiraj, Mandar Ambawane, Nikhil Bonte, Nixon Rodrigues, Sameer 
> Shaikh, and Sidharth Mishra.
> 
> 
> Bugs: ATLAS-3517
>     https://issues.apache.org/jira/browse/ATLAS-3517
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Suggestions REST API searches against all indexed fields (terms) to retrieve 
> the top frequently used terms.
> 
> we don't have a way to retrieve suggestions only from a specific indexed 
> field.
> 
> This enhancement introduces a new optional parameter in suggestions API - 
> 'fieldName', which when specified will provide suggestions against that 
> indexed field name.
> 
>  
> 
> This will be useful to get suggestions on only a specific field - say labels 
> 
> 
> *Solution:*
> 
> Solr already provides a way to search on etrms against a specific field.
> 
> https://lucene.apache.org/solr/guide/6_6/the-terms-component.html
> 
> "terms.fl=<index_field_name>" need to added as part of the request to solr 
> client on terms search
> 
> 
> Diffs
> -----
> 
>   
> graphdb/api/src/main/java/org/apache/atlas/repository/graphdb/AtlasGraphIndexClient.java
>  09a88d930 
>   
> graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusGraphIndexClient.java
>  278ec5db1 
>   
> intg/src/main/java/org/apache/atlas/model/discovery/AtlasSuggestionsResult.java
>  054ea2e87 
>   
> repository/src/main/java/org/apache/atlas/discovery/AtlasDiscoveryService.java
>  3feae27b5 
>   
> repository/src/main/java/org/apache/atlas/discovery/EntityDiscoveryService.java
>  23fd7e9c5 
>   
> repository/src/main/java/org/apache/atlas/discovery/SuggestionsProvider.java 
> 4ee1b13a9 
>   
> repository/src/main/java/org/apache/atlas/discovery/SuggestionsProviderImpl.java
>  c00a65066 
>   webapp/src/main/java/org/apache/atlas/web/rest/DiscoveryREST.java 908ae7033 
> 
> 
> Diff: https://reviews.apache.org/r/71738/diff/1/
> 
> 
> Testing
> -------
> 
> Precommit: 
> https://builds.apache.org/view/A/view/Atlas/job/PreCommit-ATLAS-Build-Test/1535/console
> 
> Manually validated that suggestions api filters based on provided field name.
> 
> 
> Thanks,
> 
> Sarath Subramanian
> 
>

Reply via email to