guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#39258] [PATCH 3/4] gnu: Generate xapian package search index.


From: Arun Isaac
Subject: [bug#39258] [PATCH 3/4] gnu: Generate xapian package search index.
Date: Fri, 06 Mar 2020 01:56:22 +0530

>> +      (fold-packages (lambda (package _)
>> +                       (let* ((idterm (string-append "Q" (package-name 
>> package)))
>> +                              (doc (make-document #:data (package-name 
>> package)
>> +                                                  #:terms `((,idterm . 0))))
>> +                              (term-generator (make-term-generator #:stem 
>> (make-stem "en")
>> +                                                                   
>> #:document doc)))
>> +                         (index-text! term-generator (package-description 
>> package))
>> +                         (replace-document! db idterm doc)))
>
> I guess these non-functional functions (index-text!, replace-document!)
> represent how Xapian works at the C++ level.  Would it be possible to
> make more functional bindings nonetheless?

I somehow overlooked this particular email and am reading it just
now. Yes, the non-functional bindings are a bit ugly. But, I'm not able
to think of a clean way to make functional bindings without supporting
all features offered by xapian. Any suggestions you have in this regard
would be useful. Look through xapian/termgenerator.h for more
details. In particular, look at functions increase_termpos,
index_text_without_positions.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]