Skip to content

Configuring Lucene Analyzer

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

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

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

Edit the $TOMCAT_HOME/openkm.properties file and add the line:

spring.jpa.properties.hibernate.search.backend.analyzer=org.apache.lucene.analysis.es.SpanishAnalyzer

If you want the accent-insensitive analyzer to ignore the distinction between accented and unaccented letters:

spring.jpa.properties.hibernate.search.backend.analyzer=com.openkm.search.lucene.analysis.AccentInsensitiveAnalyzer