[Debtags-commits] [svn] r1917 - in daemon: . src src/lib
Enrico Zini
enrico at costa.debian.org
Mon Sep 18 12:01:25 UTC 2006
Author: enrico
Date: Mon Sep 18 12:01:24 2006
New Revision: 1917
Added:
daemon/src/lib/FullText.cpp
daemon/src/lib/FullText.h
Modified:
daemon/ (props changed)
daemon/src/CMakeLists.txt
daemon/src/debtagsd.cpp
Log:
r3349 at viaza: enrico | 2006-09-17 17:44:59 +0200
Experiment with xapian to have a fast search engine on debian package descriptions
Modified: daemon/src/CMakeLists.txt
==============================================================================
--- daemon/src/CMakeLists.txt (original)
+++ daemon/src/CMakeLists.txt Mon Sep 18 12:01:24 2006
@@ -1,7 +1,7 @@
file( GLOB libsrc lib/*.cpp )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
-LINK_LIBRARIES( ept wibble tagcoll )
+LINK_LIBRARIES( ept wibble tagcoll xapian )
ADD_EXECUTABLE( debtagsd debtagsd.cpp ${libsrc} )
Modified: daemon/src/debtagsd.cpp
==============================================================================
--- daemon/src/debtagsd.cpp (original)
+++ daemon/src/debtagsd.cpp Mon Sep 18 12:01:24 2006
@@ -16,6 +16,7 @@
#include <set>
#include "lib/SignalCatcher.h"
+#include "lib/FullText.h"
#if 0
@@ -454,6 +455,13 @@
}
#endif
+ FullTextSearch fts;
+ vector<string> q;
+ q.push_back("antani");
+ set<string> res = fts.search(q);
+ for (set<string>::const_iterator i = res.begin(); i != res.end(); ++i)
+ cout << "> " << *i << endl;
+
Debtagsd debtagsd(cerr, false);/*state, op_socket, !op_no_detach, !op_no_pidfile*/
//if (op_no_detach)
return debtagsd.main();
More information about the Debtags-commits
mailing list