diff options
-rw-r--r-- | tissue/document.scm | 6 | ||||
-rw-r--r-- | tissue/issue.scm | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tissue/document.scm b/tissue/document.scm index e46e055..b12ccbb 100644 --- a/tissue/document.scm +++ b/tissue/document.scm @@ -137,7 +137,8 @@ that operates on a copy of OBJECT. It does not mutate OBJECT." (web-uri #:accessor document-web-uri #:init-keyword #:web-uri)) (define-method (document-type (document <document>)) - "document") + (string-trim-both (symbol->string (class-name (class-of document))) + (char-set #\< #\>))) (define-method (document-term-generator (document <document>)) "Return a term generator for DOCUMENT. The returned term generator has @@ -158,6 +159,9 @@ and further text, increase-termpos! must be called before indexing." (define-class <file-document> (<document>) (path #:accessor file-document-path #:init-keyword #:path)) +(define-method (document-type (document <file-document>)) + (next-method)) + (define-method (document-id-term (document <file-document>)) "Return the ID term for DOCUMENT." (string-append "Q" (file-document-path document))) diff --git a/tissue/issue.scm b/tissue/issue.scm index 2bc6b41..bbfe2cf 100644 --- a/tissue/issue.scm +++ b/tissue/issue.scm @@ -78,9 +78,6 @@ (author #:accessor post-author #:init-keyword #:author) (date #:accessor post-date #:init-keyword #:date)) -(define-method (document-type (issue <issue>)) - "issue") - (define-method (document-term-generator (issue <issue>)) "Return a term generator indexing ISSUE." (let ((term-generator (next-method))) |