You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Sarath Subramanian <sa...@apache.org> on 2019/11/08 03:34:02 UTC
Review Request 71738: ATLAS-3517: Enhance suggestions REST API to have
optional 'fieldName' parameter to get suggestions from
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71738/
-----------------------------------------------------------
Review request for atlas, Ashutosh Mestry, Sridhar K, Le Ma, and Madhan Neethiraj.
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