diff options
author | Michal Hruby <michal.mhr@gmail.com> | 2012-02-10 13:48:52 +0100 |
---|---|---|
committer | Michal Hruby <michal.mhr@gmail.com> | 2012-02-10 13:48:52 +0100 |
commit | 620a9961c7727c2b043e523d74bd6334bc6340a6 (patch) | |
tree | 443065e566818b1fb4ac4037600be12a35f2e220 /extensions/fts++ | |
parent | 9e0ec39292288c918c813ab99847c327da87b657 (diff) | |
download | zeitgeist-620a9961c7727c2b043e523d74bd6334bc6340a6.tar.gz |
Use the old fts directory and increase index version
Diffstat (limited to 'extensions/fts++')
-rw-r--r-- | extensions/fts++/indexer.cpp | 5 | ||||
-rw-r--r-- | extensions/fts++/indexer.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/extensions/fts++/indexer.cpp b/extensions/fts++/indexer.cpp index 0df5d37a..04b9ac5a 100644 --- a/extensions/fts++/indexer.cpp +++ b/extensions/fts++/indexer.cpp @@ -50,7 +50,7 @@ const Xapian::valueno VALUE_TIMESTAMP = 1; Xapian::QueryParser::FLAG_PURE_NOT | Xapian::QueryParser::FLAG_LOVEHATE | \ Xapian::QueryParser::FLAG_WILDCARD -const std::string FTS_MAIN_DIR = "ftspp.index"; +const std::string FTS_MAIN_DIR = "fts.index"; void Indexer::Initialize (GError **error) { @@ -363,8 +363,9 @@ std::string Indexer::PreprocessString (std::string const& input) std::string result (StringUtils::RemoveUnderscores (input)); // a simple heuristic for the uncamelcaser size_t num_digits = StringUtils::CountDigits (result); - if (result.length () > 3 && num_digits < result.length () / 2) + if (result.length () > 5 && num_digits < result.length () / 2) { + // FIXME: handle non-digit ids somehow as well (like rNsGg / yJuSB) // FIXME: process digits?, atm they stay attached to the text result = StringUtils::UnCamelcase (result); } diff --git a/extensions/fts++/indexer.h b/extensions/fts++/indexer.h index 6cd7deed..5b505635 100644 --- a/extensions/fts++/indexer.h +++ b/extensions/fts++/indexer.h @@ -29,7 +29,7 @@ namespace ZeitgeistFTS { -const std::string INDEX_VERSION = "1"; +const std::string INDEX_VERSION = "2"; class Indexer { |