search.controllers.advanced package¶
Handle requests to support the advanced search feature.
The primary entrypoint to this module is search()
, which handles
GET requests to the author search endpoint. It uses
AdvancedSearchForm
to generate form HTML, validate request
parameters, and produce informative error messages for the user.
-
search.controllers.advanced.
group_search
(args, groups_or_archives)[source]¶ Short-cut for advanced search with group or archive pre-selected.
Note that this only supports options supported in the advanced search interface. Anything else will result in a 404.
Return type: Tuple
[Dict
[str
,Any
],int
,Dict
[str
,Any
]]
-
search.controllers.advanced.
search
(request_params)[source]¶ Perform a search from the advanced search interface.
This is intended to support ONLY form-based search, to replace the classic advanced search view.
Parameters: request_params (dict) – Returns: - dict – Response content.
- int – HTTP status code.
- dict – Extra headers to add to the response.
Raises: InternalServerError
– Raised when there is an unrecoverable error while interacting with the search index.Return type: Tuple
[Dict
[str
,Any
],int
,Dict
[str
,Any
]]