search.routes.ui module¶
Provides the main search user interfaces.
-
search.routes.ui.
PARAMS_COOKIE_NAME
= 'arxiv-search-parameters'¶ The name of the cookie to use to persist search parameters.
-
search.routes.ui.
PARAMS_TO_PERSIST
= ['order', 'size', 'abstracts', 'date-date_type']¶ These parameters should be persisted in a cookie.
-
search.routes.ui.
advanced_search
()[source]¶ Advanced search interface.
Return type: Union
[str
,Response
]
-
search.routes.ui.
apply_response_headers
(response)[source]¶ Hook for applying response headers to all responses.
Return type: Response
-
search.routes.ui.
current_url_params_builder
()[source]¶ Add a function that gets the GET params from the current URL.
Return type: Dict
[str
,Callable
]
-
search.routes.ui.
current_url_sans_parameters_builder
()[source]¶ Add a function to strip GET parameters from the current URL.
Return type: Dict
[str
,Callable
]
-
search.routes.ui.
external_url_builder
()[source]¶ Add an external URL builder function to the template context.
Return type: Dict
[str
,Callable
]
Use parameter values in a cookie as defaults if not explicitly provided.
This will replace request.args with a
MultiDict
in order to achieve mutability.Return type: None
-
search.routes.ui.
group_search
(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: Union
[str
,Response
]
-
search.routes.ui.
is_current_builder
()[source]¶ Inject a function to evaluate whether or not a result is current.
Return type: Dict
[str
,Callable
]
-
search.routes.ui.
search
(archives=None)[source]¶ Simple search interface.
Return type: Union
[str
,Response
]
-
search.routes.ui.
service_status
()[source]¶ Health check endpoint for search.
Exercises the search index connection with a real query.
Return type: Union
[str
,Response
]
Set request parameters in the cookie, to use as future defaults.
Return type: Response