FBI-81: Suggester with Support for Filtering on Agency and Branch
Suggester service which supports agency/branch filtering
This suggester is based on the metadata fields for creator, title, and subject. It uses fuzzy matching,
so typing and spelling errors will be handled to a certain degree. The suggester will suggest a work where possible.
In some circumstances, this can be used to send a user directly from the suggester to a work page.
Request
The service provides one POST method that accepts a json structure with the following keys as request body:
q: Query - the string you want to autocomplete
agency: The agency with which to filter results [required]. An example of a agency could be '874260' (Greve)
branch: The branch name with which to filter results [optional]. Only branch names that exist under the provided agency are valid. An example of a branch could be 'Greve Gymnasium'
branchid: The branchid name with which to filter results [optional].
profile: The profile name with which to filter results [optional]. Only profile names that exist with the provided agency are valid. An example of a profile could be 'opac'
rows: Number of items to return [optional]
type: Type to filter suggestions by. Takes a list of values. Valid values are "creator", "title", "subject". [optional]
The requester must provide a valid authentication key as a bearer token in an Authentication header, encoded in base64. Here is an example of use:
You can use this tool to encode your authentication key in base64.
If you require a token, you can request one via DBC kundeservice.
Response
Each response item consists of a term suggestion and some additional info.
The objects consist of the following keys:
term: The term suggested to complete the input
work: persistent workid of the suggestion
weight: weight used for ranking. This is an internal debug value, and is not used for sorting the results. The results are returned in order of relevance