aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2018-08-27 09:08:20 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2018-08-27 09:08:20 +0200
commit61f0b236013c3b708ecfe6214b53a98fd342fac4 (patch)
tree27a3d5adffee02ed705086599261707cc391e885
parent851914e5da250e6a38e83bccf182ab8af1db0d32 (diff)
Data to be indexed in Xapian should be a string
-rw-r--r--TODO.rst6
-rw-r--r--lesana/collection.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/TODO.rst b/TODO.rst
index f8256c8..4452ab5 100644
--- a/TODO.rst
+++ b/TODO.rst
@@ -6,3 +6,9 @@ The following features are already planned.
lesana).
* Write a command which reads data from a collection and writes it to
another one, using a simple mapping of fields.
+
+The following features may be nice to have.
+
+* Having an indexing mode that adds the field as a value instead of a
+ term, see
+ https://getting-started-with-xapian.readthedocs.io/en/latest/concepts/indexing/values.html
diff --git a/lesana/collection.py b/lesana/collection.py
index fbdb935..0280f85 100644
--- a/lesana/collection.py
+++ b/lesana/collection.py
@@ -165,7 +165,7 @@ class Collection(object):
for v in values:
try:
self.indexer.index_text(
- v,
+ str(v),
1,
field['prefix'])
except ValueError as e: