diff options
author | Arun Isaac | 2023-01-29 01:03:44 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-29 01:03:44 +0000 |
commit | 6b3643c4d80507fa7e004fdb32b6768a45b4142c (patch) | |
tree | a3ad18ad442ce5ddf615b677731fe35666b7a4bb | |
parent | f9632ed5936a42999a938553a5226d769cd3e522 (diff) | |
download | tissue-6b3643c4d80507fa7e004fdb32b6768a45b4142c.tar.gz tissue-6b3643c4d80507fa7e004fdb32b6768a45b4142c.tar.lz tissue-6b3643c4d80507fa7e004fdb32b6768a45b4142c.zip |
skribilo: Temporarily disable search snippets.
* tissue/skribilo.scm (document-snippet-source-text): New method.
* issues/skribilo-fragment-snippets-need-code-from-repo.gmi: New
issue.
-rw-r--r-- | issues/skribilo-fragment-snippets-need-code-from-repo.gmi | 13 | ||||
-rw-r--r-- | tissue/skribilo.scm | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/issues/skribilo-fragment-snippets-need-code-from-repo.gmi b/issues/skribilo-fragment-snippets-need-code-from-repo.gmi new file mode 100644 index 0000000..0b0fdf6 --- /dev/null +++ b/issues/skribilo-fragment-snippets-need-code-from-repo.gmi @@ -0,0 +1,13 @@ +# Search snippets for skribilo fragments need code from repo + +* tags: bug + +Skribilo documents are really programs. So, when generating search snippets for skribilo fragments, code from the repo may need to be executed. This is problematic since the web server process does not have the repository in its load path. + +The repository cannot simply be added to the load path since the web server process may be serving multiple repositories and we don't want them to interact. + +Also, evaluating an entire skribilo document on every search query may be costly. In fact, this expense of snippet generation applies equally well to other kinds of documents (issues, texinfo documents, etc.). + +Therefore, it might be worthwhile to inter snippet source texts into the xapian index itself—specifically in the document data field. This will of course increase the size of the xapian index considerably. But, storage is cheap, and there does not seem to be any more elegant way out. + +Until this issue is fixed, we have temporarily disabled snippets for skribilo fragments. diff --git a/tissue/skribilo.scm b/tissue/skribilo.scm index 4a216d3..d0c90ba 100644 --- a/tissue/skribilo.scm +++ b/tissue/skribilo.scm @@ -95,3 +95,10 @@ output to @var{port}." (skribilo-fragment-identifier fragment) (skribilo-fragment-reader-name fragment)) <>))) + +;; We temporarily disable snippets for skribilo fragments until +;; issues/skribilo-fragment-snippets-need-code-from-repo.gmi is fixed. +(define-method (document-snippet-source-text (fragment <skribilo-fragment>)) + "Return the source text for FRAGMENT from which to extract a search +result snippet." + "") |