Add sequences to BookDetail

This commit is contained in:
2022-03-05 23:42:01 +03:00
parent 6e307b8067
commit 42181b6d4e
9 changed files with 271 additions and 269 deletions

View File

@@ -24,8 +24,8 @@ SELECT ARRAY(
class BookTGRMSearchService(TRGMSearchService):
MODEL_CLASS = BookDB
SELECT_RELATED = ["source"]
PREFETCH_RELATED = ["authors", "translators", "annotations"]
PREFETCH_RELATED = ["source"]
SELECT_RELATED = ["authors", "translators", "annotations"]
GET_OBJECT_IDS_QUERY = GET_OBJECT_IDS_QUERY
@@ -95,8 +95,8 @@ class GetRandomBookService(GetRandomService):
class BookMeiliSearchService(MeiliSearchService):
MODEL_CLASS = BookDB
SELECT_RELATED = ["source"]
PREFETCH_RELATED = ["authors", "translators", "annotations"]
PREFETCH_RELATED = ["source"]
SELECT_RELATED = ["authors", "translators", "annotations"]
MS_INDEX_NAME = "books"
MS_INDEX_LANG_KEY = "lang"