diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-15 18:15:58 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2022-02-15 18:21:09 -0800 |
commit | 991f27f75ce0a4381e417a274f08a65c5ddf678b (patch) | |
tree | 546a95b6aca26cd6b1f78423c00466e2bcae5a4b /python/fatcat_web/routes.py | |
parent | 9d668d2632bd969cfd850650641a76f56a1dbfab (diff) | |
download | fatcat-991f27f75ce0a4381e417a274f08a65c5ddf678b.tar.gz fatcat-991f27f75ce0a4381e417a274f08a65c5ddf678b.zip |
container browse: more polish
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r-- | python/fatcat_web/routes.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 0f847cca..f229a572 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -376,7 +376,7 @@ def container_view_browse(ident: str) -> AnyResponse: else: issue = "!issue:*" query_string = f"year:{year} {volume} {issue}" - query_sort = ["first_page", "release_date"] + query_sort = ["first_page", "pages", "release_date"] elif request.args.get("year") and "volume" in request.args: # year, volume specified (no issue); browse-by-page year = int(request.args.get("year")) @@ -386,12 +386,16 @@ def container_view_browse(ident: str) -> AnyResponse: else: volume = "!volume:*" query_string = f"year:{year} {volume}" - query_sort = ["issue", "first_page", "release_date"] + query_sort = ["issue", "first_page", "pages", "release_date"] elif request.args.get("year"): # year specified, not anything else; browse-by-date year = int(request.args.get("year")) query_string = f"year:{year}" query_sort = ["release_date"] + elif request.args.get("volume"): + # volume specified, not anything else; browse-by-page + query_string = f'volume:{request.args["volume"]}' + query_sort = ["issue", "first_page", "pages", "release_date"] else: entity._browse_year_volume_issue = get_elastic_container_browse_year_volume_issue( entity.ident @@ -407,7 +411,7 @@ def container_view_browse(ident: str) -> AnyResponse: # print(query_string) query = ReleaseQuery( q=query_string, - limit=200, + limit=300, offset=0, container_id=ident, fulltext_only=False, |