From e45208bf0186b1e5df464c6450104080fd1124e1 Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Fri, 6 Nov 2020 17:27:21 +0100 Subject: [PATCH] add correspondent to the index --- src/documents/index.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/documents/index.py b/src/documents/index.py index eb1a9c739..3fa8bd353 100644 --- a/src/documents/index.py +++ b/src/documents/index.py @@ -55,7 +55,8 @@ def get_schema(): return Schema( id=NUMERIC(stored=True, unique=True, numtype=int), title=TEXT(stored=True), - content=TEXT() + content=TEXT(), + correspondent=TEXT(stored=True) ) @@ -71,7 +72,8 @@ def update_document(writer, doc): writer.update_document( id=doc.pk, title=doc.title, - content=doc.content + content=doc.content, + correspondent=doc.correspondent.name if doc.correspondent else None )