Lucene Search API

Last modified by Admin on 2021/03/19 01:52

cogLucene index management and query
Developed by

XWiki Development Team

Active Installs27
0 Votes
LicenseGNU Lesser General Public License 2.1

Installable with the Extension Manager


The Lucene module is not really maintained anymore, you should now use the Solr Search API and Solr Search Query API.

It can be used in place of the default search implementation which uses Hibernate to search for documents.


Activate the plugin by editing your WEB-INF/xwiki.cfg file as follows and restart your XWiki instance:




  • The indexdir property points to where Lucene will generate the index file.
  • The analyzer property is the default Lucene Analyzer which converts all words in lowercase and filters out simple words such as "the", "a", etc. You can specify any Analyzer you wish to use here.
  • The indexinterval property controls how frequently the plugin starts an indexation thread (the value is in seconds).

To use the plugin in your wiki, you'll need to write some Velocity code to integrate it where you want to use it, as shown below.


Here's some code that does a search on "keyword" and lists all the results found:

#set($results = $xwiki.lucene.getSearchResults("keyword", "default,en,fr"))
Nb found: $results.hitcount
#foreach($result in $results.results)
 * [${result.web}.${}] #if($result.filename)($result.filename)\#end : $result.score


Nb found: 1

  • Web Home : 0.18571019

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.platform:xwiki-platform-search-lucene-api 6.4.8):

  • org.xwiki.platform:xwiki-platform-oldcore 6.4.8
  • org.xwiki.platform:xwiki-platform-rest-server 6.4.8
  • org.apache.lucene:lucene-core 4.10.3
  • org.apache.lucene:lucene-queryparser 4.10.3
  • org.apache.lucene:lucene-analyzers-common 4.10.3
  • org.apache.commons:commons-lang3 3.3.2
  • commons-collections:commons-collections 3.2.1
  • org.apache.tika:tika-parsers 1.6
  • org.ow2.asm:asm 4.1
  • org.bouncycastle:bcprov-jdk15on 1.49
  • org.bouncycastle:bcpkix-jdk15on 1.49
  • org.bouncycastle:bcmail-jdk15on 1.49
  • de.l3s.boilerpipe:boilerpipe 1.2.0-xwiki

Get Connected