From 58dcd6b052a61229e0ceb021076a1f450a80aea9 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Jun 2022 00:10:57 +0530 Subject: document: Add web-uri slot to class. * tissue/document.scm ()[web-uri]: New slot. * bin/tissue (main): Set web-uri slot before indexing document. --- bin/tissue | 4 +++- tissue/document.scm | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/tissue b/bin/tissue index 59de104..e29cf3c 100755 --- a/bin/tissue +++ b/bin/tissue @@ -250,7 +250,9 @@ top-level of the git repository." (call-with-writable-database %xapian-index (lambda (db) (for-each (lambda (indexed-document) - (let* ((document ((indexed-document-reader indexed-document))) + (let* ((document (slot-set ((indexed-document-reader indexed-document)) + 'web-uri + (indexed-document-web-uri indexed-document))) (term-generator (document-term-generator document))) (index-text! term-generator (document-type document) #:prefix "XT") (replace-document! db diff --git a/tissue/document.scm b/tissue/document.scm index 63aad96..86fa548 100644 --- a/tissue/document.scm +++ b/tissue/document.scm @@ -34,6 +34,7 @@ scm->object document-title + document-web-uri document-type document-id-term document-text @@ -129,7 +130,8 @@ that operates on a copy of OBJECT. It does not mutate OBJECT." object)))) (define-class () - (title #:accessor document-title #:init-keyword #:title)) + (title #:accessor document-title #:init-keyword #:title) + (web-uri #:accessor document-web-uri #:init-keyword #:web-uri)) (define-method (document-type (document )) "document") -- cgit v1.2.3