In the initial phase of implementation, following entities are scoped for global search.
The user authentication narrows down the access scope to a hierarchy to which user belongs to. (do we need to restrict search on user access or display all the results?)
The search is carried on scoped entities in the following order.
The search results will be listed in following order,
Request
HTTP Request
/search?query=searchstring
Parameters
Parameter | Value | Description |
Required Parameters | ||
query | string | Specify a query string for partial or exact match of clients, loans and groups |
Option Parameters | ||
maxResults | Unassigned integer | Right now not supported. (TBD for later implementation) |
pageToken | string | Right now not supported. (TBD for later implementation). This will be used for pagination of large set of results. |
Response
If successful, this method returns a response body with the following structure:
{
"entitytype":"CLIENT",
"id":1,
"name":"display name",
"accountNo":"000000001"
"loanofficer":"FirstName LastName",
"hierarchy":{
"id":2,
"name":"display name"
"hierarchy":{
"id":3,
"name":"display name",
}
},
"activeLoanCount": 1,
"openLoans": [
{
"id": 1,
"accountNo": "000000001",
"productId": 1,
"productName": "A new loan product for me",
"status": {
"id": 300,
"code": "loanStatusType.active",
"value": "Active"
}
}
]
}
Out of Scope:
As part of global search, search scope to resource level is not included.
At later stage we can think of adding search scope at resource level like,
/search?resource=client?displayName=joe
Or
/clients?displayName=joe?officeId=2
In these kind of search we need to come up with a search template for each of the scoped resource.