Configuring Lucene Analyzer

Depending on the language used in the documents and properties, you can obtain better search results configuring a proper Lucene Analyzer.  

By default, OpenKM use the org.apache.lucene.analysis.standard.StandardAnalyzer which works fine with English and most languages, but you can get better search results configuring a more specific analyzer for you language.

Some analyzers:

  • org.apache.lucene.analysis.en.EnglishAnalyzer
  • org.apache.lucene.analysis.el.GreekAnalyzer
  • org.apache.lucene.analysis.hi.HindiAnalyzer

Special analyzers:

  • com.openkm.analysis.AccentInsensitiveAnalyzer

More information at:

If you want a non-accent sensitive analyzer you can try AccentInsensitiveAnalyzer.

If you are working with oriental languages like Chinese or Japanese you have several analyzers to choose from. Read Lucene documentation. You can also try ik-analyzer.

If you only want a white space tokenized analyzer you can try WhitespaceAnalyzer.

 If you have not configured the search analyzer before the first time you start OpenKM, then Lucene index will be created using this default analyzer.  

If you want to change this configuration property after the OpenKM repository has been created you need to Rebuild Lucene Indexes.

Once the operation has been completed, the Lucene indexes will use the new analyzer.

For more information see Rebuild indexes.

Configure an Analyzer

Edit the $TOMCAT_HOME/OpenKM.cfg file and add the line:

The changes will take effect after restarting the application.