Lucene Plugin

The Lucene Plugin uses Lucene to asynchronously index the documents in the wiki/farm. The plugin is enabled by default in XWiki, so you will find it in the "xwiki.plugins" list of the xwiki.cfg file:


The dedicated section in the xwiki.cfg file allows you to further customize the Lucene search engine:

#-# Lucene search engine
#-# Location where to place the lucene index files. The default is the "lucene" subdirectory in XWiki's permanent data
#-# directory. Change it if you want to store indexes in another place.
# xwiki.plugins.lucene.indexdir=/usr/local/xwiki/lucene
#-# The text analyzer to use for indexing.
# xwiki.plugins.lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
#-# The number of seconds to wait between reindexes. A smaller value ensures that new documents will be indexed faster,
#-# but with a minor performance reduction. Adjust according to your wiki load.
# xwiki.plugins.lucene.indexinterval=20
#-# The maximum size of the indexing queue. After this limit is reached, the reindex thread will have to wait until the
#-# queue is consumed. Note that this does not affect documents submitted through the notification mechanism, only the
#-# full reindex option.
# xwiki.plugins.lucene.maxQueueSize=1000

The default folder that stores the Lucene index is <permanent directory>/lucene but you can change it by editing the xwiki.plugins.lucene.indexdir parameter. 

The xwiki.plugins.lucene.analyzer parameter is the default Lucene Analyzer which converts all words in lowercase and filters out simple words such as "the", "a". Other available analyzers are listed at this link.

The xwiki.plugins.lucene.indexinterval parameter controls how frequently the plugin starts an indexation thread. The value is in seconds. 

The xwiki.plugins.lucene.maxQueueSize parameter sets the maximum number of elements in the indexing queue. Most importantly, this property only affects the "Index the whole farm" option. 

More information is available in the "Search Application" and "Customizing the Search Feature" documentation pages listed in the "Related Pages" section.

The source code is available on GitHub at xwiki-platform-search-lucene


Related Pages

Search this space


Most popular tags

Failed to execute the [groovy] macro
  1. access rights
  2. activity stream
  3. annotation
  4. attachment
  5. comment
  6. Document Tree Macro
  7. export
  8. Extension Manager
  9. Flamingo skin
  10. global user
  11. Groovy event listener
  12. group
  13. nested page
  14. search
  15. skin
  16. syntax
  17. user
  18. user profile
  19. velocity macros
  20. wiki
  21. wysiwyg
  22. XWiki Applications
  23. xwikiattachment_archive table
  24. xwikiattachment table
  25. xwikiattrecyclebin table
  26. xwikiproperties table

[Display all tags from this space]