Lucene Search is a property in the portal.properties file, which is the default configuration file for Sun GlassFish Web Space Server. You can override this property using portal-ext.properties file.
Set the following to true if you want to avoid any writes to the index. This is useful in some clustering environments where there is a shared index and only one node of the cluster updates it.
index.read.only=false |
Set the following to true if you want to index your entire library of files on startup.
index.on.startup=false |
Set the following to true if you want the indexing on startup to be executed on a separate thread to speed up execution.
index.with.thread=true |
Designate whether Lucene stores indexes in a database via JDBC, file system, or in RAM.
Examples:
lucene.store.type=jdbc lucene.store.type=file lucene.store.type=ram |
Lucene's storage of indexes via JDBC has a bug where temp files are not removed. This can eat up disk space over time. Set the following property to true to automatically clean up the temporary files once a day. See LEP-2180.
lucene.store.jdbc.auto.clean.up=true |
Set the JDBC dialect that Lucene uses to store indexes in the database. This is only referenced if Lucene stores indexes in the database. Liferay will attempt to load the proper dialect based on the URL of the JDBC connection. For example, the property lucene.store.jdbc.dialect.mysql is read for the JDBC connection URL jdbc:mysql://localhost/lportal.
lucene.store.jdbc.dialect.db2=org.apache.lucene.store.jdbc.dialect.DB2Dialect lucene.store.jdbc.dialect.derby=org.apache.lucene.store.jdbc.dialect.Derby- Dialect lucene.store.jdbc.dialect.hsqldb=org.apache.lucene.store.jdbc.dialect.HSQLDialect lucene.store.jdbc.dialect.jtds=org.apache.lucene.store.jdbc.dialect. SQLServerDialect lucene.store.jdbc.dialect.microsoft=org.apache.lucene.store.jdbc.dialect. SQLServerDialect lucene.store.jdbc.dialect.mysql=org.apache.lucene.store.jdbc.dialect.MySQLDialect #lucene.store.jdbc.dialect.mysql=org.apache.lucene.store.jdbc.dialect. MySQLInnoDBDialect #lucene.store.jdbc.dialect.mysql=org.apache.lucene.store.jdbc.dialect. MySQLMyISAMDialect lucene.store.jdbc.dialect.oracle=org.apache.lucene.store.jdbc.dialect.OracleDialect lucene.store.jdbc.dialect.postgresql=org.apache.lucene.store.jdbc.dialect.- PostgreSQLDialect |
Set the directory where Lucene indexes are stored. This is only referenced if Lucene stores indexes in the file system.
lucene.dir=${resource.repositories.root}/lucene/ |
Input a class name that extends com.liferay.portal.search.lucene.LuceneFileExtractor. This class is called by Lucene to extract text from complex files so that they can be properly indexed.
lucene.file.extractor=com.liferay.portal.search.lucene.LuceneFileExtractor |
The file extractor can sometimes return text that is not valid for Lucene. This property expects a regular expression. Any character that does not match the regular expression will be replaced with a blank space. Set an empty regular expression to disable this feature.
Examples:
lucene.file.extractor.regexp.strip= lucene.file.extractor.regexp.strip=[\\d\\w] |
Set the default analyzer used for indexing and retrieval.
Examples:
lucene.analyzer=org.apache.lucene.analysis.br.BrazilianAnalyzer lucene.analyzer=org.apache.lucene.analysis.cn.ChineseAnalyzer lucene.analyzer=org.apache.lucene.analysis.cjk.CJKAnalyzer lucene.analyzer=org.apache.lucene.analysis.cz.CzechAnalyzer lucene.analyzer=org.apache.lucene.analysis.nl.DutchAnalyzer lucene.analyzer=org.apache.lucene.analysis.fr.FrenchAnalyzer lucene.analyzer=org.apache.lucene.analysis.de.GermanAnalyzer lucene.analyzer=org.apache.lucene.analysis.KeywordAnalyzer lucene.analyzer=org.apache.lucene.index.memory.PatternAnalyzer lucene.analyzer=org.apache.lucene.analysis.PerFieldAnalyzerWrapper lucene.analyzer=org.apache.lucene.analysis.ru.RussianAnalyzer lucene.analyzer=org.apache.lucene.analysis.SimpleAnalyzer lucene.analyzer=org.apache.lucene.analysis.snowball.SnowballAnalyzer lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer lucene.analyzer=org.apache.lucene.analysis.StopAnalyzer lucene.analyzer=org.apache.lucene.analysis.WhitespaceAnalyzer |
Set Lucene's merge factor. Higher numbers mean indexing goes faster but uses more memory. The default value from Lucene is 10. This should never be set to a number lower than 2.
lucene.merge.factor=10 |
Set how often to run Lucene's optimize method. Optimization speeds up searching but slows down writing. Set this property to 0 to always optimize. Set this property to an integer greater than 0 to optimize every X writes.
lucene.optimize.interval=1 |