aboutsummaryrefslogtreecommitdiff
path: root/xapian/xapian.scm
diff options
context:
space:
mode:
Diffstat (limited to 'xapian/xapian.scm')
-rw-r--r--xapian/xapian.scm10
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)