mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-24 05:31:57 +00:00
* disabled search and landingpage override * search query modified * routes: injecting routes to override
26 lines
715 B
Python
26 lines
715 B
Python
# -*- coding: utf-8 -*-
|
|
#
|
|
# Copyright (C) 2020 TU Graz.
|
|
# Copyright (C) 2020 mojib wali.
|
|
#
|
|
# invenio-theme-tugraz is free software; you can redistribute it and/or
|
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
# details.
|
|
|
|
"""Frontpage records."""
|
|
|
|
from __future__ import absolute_import, print_function
|
|
|
|
from elasticsearch_dsl.query import Q
|
|
from invenio_search.api import RecordsSearch
|
|
|
|
|
|
class FrontpageRecordsSearch(RecordsSearch):
|
|
"""Search class for records that goes on the frontpage."""
|
|
|
|
class Meta:
|
|
"""Default index and filter for frontpage search."""
|
|
|
|
index = "rdmrecords-records"
|
|
default_filter = Q("query_string", query=("access.record:public"))
|