diff options
Diffstat (limited to 'python/fatcat_web')
-rw-r--r-- | python/fatcat_web/entity_helpers.py | 4 | ||||
-rw-r--r-- | python/fatcat_web/search.py | 4 | ||||
-rw-r--r-- | python/fatcat_web/templates/release_view.html | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py index af0fea83..591dda80 100644 --- a/python/fatcat_web/entity_helpers.py +++ b/python/fatcat_web/entity_helpers.py @@ -53,6 +53,10 @@ def enrich_release_entity(entity): entity._es = release_to_elasticsearch(entity, force_bool=False) if entity.container and entity.container.state == "active": entity.container._es = container_to_elasticsearch(entity.container, force_bool=False) + if entity.files: + # remove shadows-only files with no URLs + entity.files = [f for f in entity.files + if not (f.extra and f.extra.get('shadows') and not f.urls)] if entity.filesets: for fs in entity.filesets: fs._total_size = sum([f.size for f in fs.manifest]) diff --git a/python/fatcat_web/search.py b/python/fatcat_web/search.py index 7c60a6dd..6b2b9cc1 100644 --- a/python/fatcat_web/search.py +++ b/python/fatcat_web/search.py @@ -77,7 +77,7 @@ def do_release_search(q, limit=30, fulltext_only=True, offset=0): "default_operator": "AND", "analyze_wildcard": True, "lenient": True, - "fields": ["title^5", "contrib_names^2", "container_title"], + "fields": ["biblio"], }, }, } @@ -106,7 +106,7 @@ def do_container_search(q, limit=30, offset=0): "default_operator": "AND", "analyze_wildcard": True, "lenient": True, - "fields": ["name^5", "publisher"], + "fields": ["biblio"], }, }, } diff --git a/python/fatcat_web/templates/release_view.html b/python/fatcat_web/templates/release_view.html index 83ecd1c8..961b4759 100644 --- a/python/fatcat_web/templates/release_view.html +++ b/python/fatcat_web/templates/release_view.html @@ -196,8 +196,9 @@ </tbody> </table> {% else %} -<p>There are no known files associated with this release (you could try -<a href="/work/{{ release.work_id }}">other releases for this work?</a>). +<p>There are no accessible files associated with this release. You could check +<a href="/work/{{ release.work_id }}">other releases for this work</a> for an +accessible version. {% endif %} {% endif %} |