aboutsummaryrefslogtreecommitdiff
path: root/README.org
blob: 83545a9fb474d2bd3d8f3b26d86cce0eb1f46e2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#+TITLE: guile-xapian
#+OPTIONS: *:nil
#+MACRO: ci-badge [[https://ci.systemreboot.net/jobs/$1][https://ci.systemreboot.net/badge/$1.svg]]

{{{ci-badge(guile-xapian-with-guile-2.2)}}} {{{ci-badge(guile-xapian-with-guile-3.0)}}} {{{ci-badge(guile-xapian-with-guile-3.0-latest)}}} {{{ci-badge(guile-xapian-website)}}}

guile-xapian provides Guile bindings for [[https://xapian.org][Xapian]], a search engine
library. Xapian is a highly adaptable toolkit which allows developers
to easily add advanced indexing and search facilities to their own
applications. It has built-in support for several families of
weighting models and also supports a rich set of boolean query
operators.

Once these bindings are sufficiently mature, they will be merged with
[[https://github.com/xapian/xapian/tree/master/xapian-bindings][xapian-bindings]]. This will involve creating more complete
Scheme-friendly wrapping of the Xapian library, writing test cases and
documentation. When we are done, the user should not ever have to call
the low level functions in (xapian wrap) and should be able to do
almost everything using only the higher level Scheme-friendly
functions in (xapian xapian).

There is no proper documentation yet. See the examples in the source
tree. Also see [[https://getting-started-with-xapian.readthedocs.io/en/latest/index.html][Getting Started with Xapian]] which describes the Python
bindings.

*Warning:* guile-xapian is in a very early stage of development and
the high level API in (xapian xapian) is not stable. It may change at
any time.

* Usage

Drop into a development environment.

#+BEGIN_SRC sh
guix environment -l guix.scm
#+END_SRC

Bootstrap autotools, then configure and make.

#+BEGIN_SRC sh
./bootstrap.sh
./configure
make
#+END_SRC

Try out the examples.

First, let's index data in examples/100-objects.sexp creating a
Xapian database at /tmp/db.

#+BEGIN_SRC sh
./pre-inst-env guile examples/index.scm examples/100-objects.sexp /tmp/db
#+END_SRC

Then, we may run searches on the database. Shown below are a few
example searches.

#+BEGIN_SRC sh
./pre-inst-env guile examples/search.scm /tmp/db watch
./pre-inst-env guile examples/search.scm /tmp/db Dent watch
./pre-inst-env guile examples/search.scm /tmp/db title:sunwatch
./pre-inst-env guile examples/search.scm /tmp/db description:\"leather case\" AND title:sundial
#+END_SRC

* Contributing

Feedback, suggestions, feature requests and bug reports are all
welcome. Please write to me at [[mailto:arunisaac@systemreboot.net][arunisaac@systemreboot.net]].

* License

guile-xapian is free software released under the terms of the [[https://www.gnu.org/licenses/gpl-3.0.html][GNU
General Public License]], either version 2 of the License, or (at your
option) any later version.