Merged 5.2.N (5.2.1) to HEAD (5.2)

130180 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1)
      129820 gjames: SEARCH-113: The JSON body not request is used for all params


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130331 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-09-06 22:04:42 +00:00
parent e9783d8e04
commit 7e95472e8c
4 changed files with 30 additions and 20 deletions

View File

@@ -90,14 +90,14 @@ public class SearchApiWebscript extends AbstractWebScript implements RecognizedP
//Parse the parameters
Params params = getParams(webScriptRequest, searchQuery);
//Turn the params into the Java SearchParameters object
//Turn the SearchQuery json into the Java SearchParameters object
SearchParameters searchParams = searchMapper.toSearchParameters(searchQuery);
//Call searchService
ResultSet results = searchService.query(searchParams);
//Turn solr results into JSON
CollectionWithPagingInfo<Node> resultJson = resultMapper.toCollectionWithPagingInfo(params, results);
CollectionWithPagingInfo<Node> resultJson = resultMapper.toCollectionWithPagingInfo(searchQuery, results);
//Post-process the request and pass in params, eg. params.getFilter()
Object toRender = helper.processAdditionsToTheResponse(null, null, null, params, resultJson);
@@ -111,7 +111,7 @@ public class SearchApiWebscript extends AbstractWebScript implements RecognizedP
}
/**
* Gets the Params object, parameters come from the SearchQuery json not the requerst
* Gets the Params object, parameters come from the SearchQuery json not the request
* @param webScriptRequest
* @param searchQuery
* @return Params