diff options
author | Arun Isaac | 2022-10-18 01:59:06 +0530 |
---|---|---|
committer | Arun Isaac | 2022-10-18 01:59:06 +0530 |
commit | d9bd3869d61a9013685d9e6b82d3f2a617483bb4 (patch) | |
tree | f15d5b36c3fcaa3cf8943e5639ae1dbd8b0bdd1a /xapian | |
parent | 3cf53245de32f3717496e35d4111d59a019ea0c2 (diff) | |
download | guile-xapian-d9bd3869d61a9013685d9e6b82d3f2a617483bb4.tar.gz guile-xapian-d9bd3869d61a9013685d9e6b82d3f2a617483bb4.tar.lz guile-xapian-d9bd3869d61a9013685d9e6b82d3f2a617483bb4.zip |
xapian: Allow indexing text without position information.
* xapian/xapian.scm (index-text!): Add positions? argument.
Diffstat (limited to 'xapian')
-rw-r--r-- | xapian/xapian.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xapian/xapian.scm b/xapian/xapian.scm index 0da12a5..f8ba284 100644 --- a/xapian/xapian.scm +++ b/xapian/xapian.scm @@ -148,11 +148,15 @@ bytevector." (TermGenerator-set-document term-generator document) term-generator)) -(define* (index-text! term-generator text #:key (wdf-increment 1) (prefix "")) +(define* (index-text! term-generator text #:key (wdf-increment 1) (prefix "") (positions? #t)) "Index @var{text} using @var{term-generator}. @var{wdf-increment} is the within document frequency increment. @var{prefix} is the term -prefix to use." - (TermGenerator-index-text term-generator text wdf-increment prefix)) +prefix to use. If @var{positions?} is #f, position information is not +generated." + ((if positions? + TermGenerator-index-text + TermGenerator-index-text-without-positions) + term-generator text wdf-increment prefix)) (define increase-termpos! TermGenerator-increase-termpos) |