XWiki plugins
In the beginning of the year (Update: we speak of 2005 here) I reviewed XWiki for use as our internal knowledgebase at work. Being a somewhat young project it still lacked some basic features. Especially change notification by mail and an indexed search were features marked as must have on our requirements list. Additionally we wanted to integrate searching across external documents (Javadoc, PDF- and Office documents).
So I wrote two plugins for XWiki, implementing these two functionalities.
Lucene plugin
This plugin integrates Lucene with XWiki. Download links and Installation instructions can be found on the Maven project page.
Features
- Indexing of both page contents and attachments (where text extraction can be done, at the moment this includes OpenOffice Writer, MSWord, PDF and XML/XHTML)
- Automatic index updating when Documents or Attachments change/are created
- External Lucene indexes can be integrated to do combined searches on multiple indexes
- Full power of the Lucene query language
- Support for virtual Wikis: Allows to search one or more named virtual wikis, and global searches across all virtual wikis
- Multi language support: search documents having translations in one of the given languages.
- Respects XWikis user management, users doing a search only get results they are allowed to view.
- Supports paging through search results, the number of results per page is configurable.
Todo
- Index XWiki’s structured data
- Support more attachment types
- Make external index integration more flexible, atm this only works with indexes using the same field names as the plugin
Status
The plugin was developed using XWiki Version 0.9.543. Since I don’t know XWiki that long I can’t say with which older XWiki Version it will or won’t run.
Thanks to the valuable feedback of Ludovic, who tried out the early versions of the plugin in a large virtual wiki environment, it has now reached a quite stable and imho useable state. Current Version is 0.9.3 released September 12th, 2005.
Email notification plugin
This plugin allows users of Xwiki to receive notifications about changes of documents by email.
Maven generated project page.
Features
- Users can subscribe to single documents, webs, or choose to receive notifications for the whole wiki.
- Overlapping subscriptions (i.e. whole wiki and some single pages from this wiki subscribed) do not result in double-notifications.
- Multiple subsequent notifications to the same document in a single notification interval are aggregated and result in the document being shown in the notificatio n mail only once (last change is shown). This could easily be extended to display the complete change history.
- Users of course don’t get notified of their own changes.
- The Administrator of a wiki can decide what notification intervals he wants to offer. This is done by simply defining cron-like expressions in a properties file. The user can then choose one of these defined intervals.
- Users can edit their subscription settings by opening to their home page (XWiki.username) with the object editor. Once the user has subscribed his first document there will be an instance of class Plugins.EmailSubscriptions attached to his homepage. This instance holds all subscribed pages and webs, and the selected notifi cation interval. This data can be directly modified through the object editor.
- Notification mails are based on a velocity template allowing easy customization.
Status
- Seems to work, but did not get much testing. Please try it and give me feedback!
The end of the story
Unfortunately in the end we chose (Twiki) since it really seemed to be the more mature system and offered more functionality via a wide range of plugins. The plan was to do the indexed search with Twiki’s plucene plugin (Plucene is a perl port of lucene).
In fact, Plucene didn’t manage to index our external documents. It works fine for the wiki itself, but the attempt to index only some hundred MB of mixed documents ended after some hours in plucene having eaten several GB of memory. I don’t remember exactly if it crashed for other reasons then or if there simply was no swap space left.
So in the end we now have an external lucene based indexing server serving search results to a JavaScript powered search page inside the Wiki. That makes a neat combo - Scripting language based frontend connected to a Java based backend via AJAX. Or however you would like to call it ;-)
That said, I doubt I’ll have time to develop these plugins any further. Source is contained in the official XWiki repository, so development can be continued.