Commit c572e541 by kevalbhatt Committed by Madhan Neethiraj

ATLAS-1608: search UI improvement (queryParam change from type -> typeName)

parent bcc138ac
...@@ -238,7 +238,7 @@ define(['require', ...@@ -238,7 +238,7 @@ define(['require',
if (Utils.getUrlState.isTagTab()) { if (Utils.getUrlState.isTagTab()) {
this.searchCollection.url = UrlLinks.searchApiUrl(Enums.searchUrlType.DSL); this.searchCollection.url = UrlLinks.searchApiUrl(Enums.searchUrlType.DSL);
} }
_.extend(this.searchCollection.queryParams, { 'query': value.query.trim() || null, 'type': value.type || null, 'classification': value.tag || null }); _.extend(this.searchCollection.queryParams, { 'query': value.query.trim() || null, 'typeName': value.type || null, 'classification': value.tag || null });
} }
Globals.searchApiCallRef = this.searchCollection.fetch({ Globals.searchApiCallRef = this.searchCollection.fetch({
skipDefaultError: true, skipDefaultError: true,
......
...@@ -51,7 +51,7 @@ public class DiscoveryREST { ...@@ -51,7 +51,7 @@ public class DiscoveryREST {
/** /**
* Retrieve data for the specified DSL * Retrieve data for the specified DSL
* @param query DSL query * @param query DSL query
* @param type limit the result to only entities of specified type or its sub-types * @param typeName limit the result to only entities of specified type or its sub-types
* @param classification limit the result to only entities tagged with the given classification or or its sub-types * @param classification limit the result to only entities tagged with the given classification or or its sub-types
* @param limit limit the result set to only include the specified number of entries * @param limit limit the result set to only include the specified number of entries
* @param offset start offset of the result set (useful for pagination) * @param offset start offset of the result set (useful for pagination)
...@@ -66,7 +66,7 @@ public class DiscoveryREST { ...@@ -66,7 +66,7 @@ public class DiscoveryREST {
@Consumes(Servlets.JSON_MEDIA_TYPE) @Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query, public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query,
@QueryParam("type") String type, @QueryParam("typeName") String typeName,
@QueryParam("classification") String classification, @QueryParam("classification") String classification,
@QueryParam("limit") int limit, @QueryParam("limit") int limit,
@QueryParam("offset") int offset) throws AtlasBaseException { @QueryParam("offset") int offset) throws AtlasBaseException {
...@@ -74,14 +74,14 @@ public class DiscoveryREST { ...@@ -74,14 +74,14 @@ public class DiscoveryREST {
try { try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingDSL(" + query + "," + type + perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingDSL(" + query + "," + typeName
"," + classification + "," + limit + "," + offset + ")"); + "," + classification + "," + limit + "," + offset + ")");
} }
String queryStr = query == null ? "" : query; String queryStr = query == null ? "" : query;
if (StringUtils.isNoneEmpty(type)) { if (StringUtils.isNoneEmpty(typeName)) {
queryStr = type + " " + queryStr; queryStr = typeName + " " + queryStr;
} }
if (StringUtils.isNoneEmpty(classification)) { if (StringUtils.isNoneEmpty(classification)) {
...@@ -132,7 +132,7 @@ public class DiscoveryREST { ...@@ -132,7 +132,7 @@ public class DiscoveryREST {
/** /**
* Retrieve data for the specified fulltext query * Retrieve data for the specified fulltext query
* @param query Fulltext query * @param query Fulltext query
* @param type limit the result to only entities of specified type or its sub-types * @param typeName limit the result to only entities of specified type or its sub-types
* @param classification limit the result to only entities tagged with the given classification or or its sub-types * @param classification limit the result to only entities tagged with the given classification or or its sub-types
* @param limit limit the result set to only include the specified number of entries * @param limit limit the result set to only include the specified number of entries
* @param offset start offset of the result set (useful for pagination) * @param offset start offset of the result set (useful for pagination)
...@@ -147,7 +147,7 @@ public class DiscoveryREST { ...@@ -147,7 +147,7 @@ public class DiscoveryREST {
@Consumes(Servlets.JSON_MEDIA_TYPE) @Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchUsingBasic(@QueryParam("query") String query, public AtlasSearchResult searchUsingBasic(@QueryParam("query") String query,
@QueryParam("type") String type, @QueryParam("typeName") String typeName,
@QueryParam("classification") String classification, @QueryParam("classification") String classification,
@QueryParam("limit") int limit, @QueryParam("limit") int limit,
@QueryParam("offset") int offset) throws AtlasBaseException { @QueryParam("offset") int offset) throws AtlasBaseException {
...@@ -155,11 +155,11 @@ public class DiscoveryREST { ...@@ -155,11 +155,11 @@ public class DiscoveryREST {
try { try {
if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) { if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingBasic(" + query + "," + type + perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "DiscoveryREST.searchUsingBasic(" + query + "," +
"," + classification + "," + limit + "," + offset + ")"); typeName + "," + classification + "," + limit + "," + offset + ")");
} }
return atlasDiscoveryService.searchUsingBasicQuery(query, type, classification, limit, offset); return atlasDiscoveryService.searchUsingBasicQuery(query, typeName, classification, limit, offset);
} finally { } finally {
AtlasPerfTracer.log(perf); AtlasPerfTracer.log(perf);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment