50 query_parts = query.split(
" ")
52 discovery_filters = []
53 for query_part
in query_parts:
54 filter_category_and_value = query_part.split(
"-", 1)
56 if len(filter_category_and_value) < 2:
59 filter_category = filter_category_and_value[0]
61 if filter_category
in filter_types:
62 discovery_filters.append(query_part)
64 params[
'discovery'] = len(discovery_filters) != 0
66 if params[
'discovery']:
68 'page': params[
'pageno'],
71 params[
"url"] = f
"{base_url}/api/discovery?{urlencode(args)}"
72 for discovery_filter
in discovery_filters:
73 params[
"url"] += f
"&filters[]={discovery_filter}"
77 'page': params[
'pageno'],
80 params[
"url"] = f
"{base_url}/api/search?{urlencode(args)}"