Revision 725782

Go back to digest for 21st October 2007

Other in KDE Base

Jos van den Oever committed changes in /trunk/kdesupport/strigi:

This is a rather big patch that moves the code for the actual indexes into loadable plugins.

Strigi has always abstracted the index containing all the search terms. This means you can use any database by implementing three classes: IndexManager, IndexWriter and IndexReader. Only one thing was missing: loading these index types from plugins. In practice this meant that different indices need to be added at compile time. It also meant no GPLed databases can be used.

For Nepomuk, Sebastian Trueg has written an implementation of a Strigi index that stores the data in the Nepomuk storage. In doing so, he has created a direct need for indexes as plugins.

So I've writting the code to make this possible and I've attached it as a patch. Since we are in freeze I'm asking you all to have a look at it. The plugin loading part is basically the same as what we use for loading the analyzer plugins.

So what does the patch add:
- add a class IndexPluginLoader (not public) that looks in the strigi plugin directory for files named strigiindex_$name.{so,dll} and loads them if they define createIndexManager and deleteIndexManager.
- ports all strigi code to use it
- removes the compile-time lib${name]index.so libraries and uses the plugins instead

No public API is changed by this code. It does add a macro REGISTER_STRIGI_INDEXMANAGER for easily registering an IndexManager in a plugin.

In hindsight, we should have added this much earlier as it makes (will make) the build system dependencies much cleaner.

File Changes

Added 3 files
  • /trunk/kdesupport/strigi/src/streamanalyzer
  •   /indexplugin.h
  •   /indexpluginloader.cpp
  •   /indexpluginloader.h
Modified 27 files
  • /trunk/kdesupport/strigi
  •   /src/combinedindexer/CMakeLists.txt
  •   /src/combinedindexer/combinedindexmanager.cpp
  •   /src/combinedindexer/combinedindexmanager.h
  •   /src/combinedindexer/tssptr.h
  •   /src/daemon/daemon.cpp
  •   /src/daemon/interface.cpp
  •   /src/luceneindexer/cluceneindexmanager.cpp
  •   /src/luceneindexer/cluceneindexmanager.h
  •   /src/luceneindexer/CMakeLists.txt
  •   /src/luceneindexer/luceneindexer.cpp
  •   /src/streamanalyzer/CMakeLists.txt
  •   /src/streamanalyzer/indexmanager.h
  •   /src/strigicmd/strigicmd.cpp
  •   /tests/indextesters/indexmanagertester.cpp
  •   /tests/indextesters/indexreadertester.cpp
  •   /tests/indextesters/indexsearchtester.cpp
  •   /tests/indextesters/indexwritertester.cpp
  •   /tests/luceneindexer/CMakeLists.txt
  •   /tests/luceneindexer/luceneindexmanagertest.cpp
  •   /tests/luceneindexer/luceneindexreadertest.cpp
  •   /tests/luceneindexer/luceneindexwritertest.cpp
  •   /tests/streamanalyzer/diranalyzertester.cpp
  •   /tests/utils/CMakeLists.txt
  •   /tests/utils/unittestfunctions.cpp
  •   /src/luceneindexer/indexdump/CMakeLists.txt
  •   /src/luceneindexer/tests/CLuceneTest.cpp
  •   /src/luceneindexer/tests/CMakeLists.txt
30 files changed in total