← Back to team overview

zeitgeist team mailing list archive

[Branch ~zeitgeist/zeitgeist/bluebird] Rev 392: Use the old fts directory and increase index version

 

------------------------------------------------------------
revno: 392
committer: Michal Hruby <michal.mhr@xxxxxxxxx>
branch nick: bluebird
timestamp: Fri 2012-02-10 13:48:52 +0100
message:
  Use the old fts directory and increase index version
modified:
  extensions/fts++/indexer.cpp
  extensions/fts++/indexer.h


--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird

Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'extensions/fts++/indexer.cpp'
--- extensions/fts++/indexer.cpp	2012-02-10 11:54:32 +0000
+++ extensions/fts++/indexer.cpp	2012-02-10 12:48:52 +0000
@@ -50,7 +50,7 @@
   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 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);
   }

=== modified file 'extensions/fts++/indexer.h'
--- extensions/fts++/indexer.h	2012-02-10 11:30:52 +0000
+++ extensions/fts++/indexer.h	2012-02-10 12:48:52 +0000
@@ -29,7 +29,7 @@
 
 namespace ZeitgeistFTS {
 
-const std::string INDEX_VERSION = "1";
+const std::string INDEX_VERSION = "2";
 
 class Indexer
 {