From 61f0b236013c3b708ecfe6214b53a98fd342fac4 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Mon, 27 Aug 2018 09:08:20 +0200 Subject: Data to be indexed in Xapian should be a string --- TODO.rst | 6 ++++++ lesana/collection.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3