summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-30 15:29:26 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-30 15:29:26 +0200
commitff9e3d52590a00b4bd48d3b8de286ee8585336d1 (patch)
treeacdcf1405558f0d37d0a500301e11808899ee05b
parent824a59466eeb08327cd811493fc6f0aa90ea1e1d (diff)
downloadsink-ff9e3d52590a00b4bd48d3b8de286ee8585336d1.tar.gz
sink-ff9e3d52590a00b4bd48d3b8de286ee8585336d1.zip
Prevent phrase searches from spanning different indexed parts
-rw-r--r--common/fulltextindex.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/fulltextindex.cpp b/common/fulltextindex.cpp
index e57a562..bf0151e 100644
--- a/common/fulltextindex.cpp
+++ b/common/fulltextindex.cpp
@@ -73,6 +73,8 @@ void FulltextIndex::add(const QByteArray &key, const QList<QPair<QString, QStrin
73 for (const auto &entry : values) { 73 for (const auto &entry : values) {
74 if (!entry.second.isEmpty()) { 74 if (!entry.second.isEmpty()) {
75 generator.index_text(entry.second.toStdString()); 75 generator.index_text(entry.second.toStdString());
76 //Prevent phrase searches from spanning different indexed parts
77 generator.increase_termpos();
76 } 78 }
77 } 79 }
78 document.add_value(0, key.toStdString()); 80 document.add_value(0, key.toStdString());