Class LuceneUtility
- java.lang.Object
-
- in.cdac.medinfo.csnotk.csnolib.luceneindexutils.LuceneUtility
-
- All Implemented Interfaces:
java.io.Serializable
public class LuceneUtility extends java.lang.Object implements java.io.SerializableUtility class providing common methods and objects for Lucene Index functionality is provided by this class.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANDstatic java.lang.StringE_MMM_DD_HH_MM_SS_Z_YYYYstatic org.apache.lucene.index.IndexWriterConfigindexConfigstatic org.apache.lucene.store.DirectoryindexDirectorystatic org.apache.lucene.index.IndexWriterindexWriterstatic java.lang.StringINVALID_PARAMETERstatic SearchIndexsearchAgent
-
Constructor Summary
Constructors Constructor Description LuceneUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.lucene.analysis.AnalyzergetAnalyzer()ReturnsAnalyzerobject.static org.apache.lucene.index.IndexReadergetIndexReader(java.lang.String refsetId)ReturnsIndexReaderobject.static org.apache.lucene.search.IndexSearchergetIndexSearcher(org.apache.lucene.index.IndexReader reader)ReturnsIndexSearcherobject.static org.apache.lucene.index.IndexWritergetIndexWriter(java.lang.String refsetId)ReturnsIndexWriterobject.
-
-
-
Field Detail
-
INVALID_PARAMETER
public static final java.lang.String INVALID_PARAMETER
- See Also:
- Constant Field Values
-
E_MMM_DD_HH_MM_SS_Z_YYYY
public static final java.lang.String E_MMM_DD_HH_MM_SS_Z_YYYY
- See Also:
- Constant Field Values
-
AND
public static final java.lang.String AND
- See Also:
- Constant Field Values
-
indexWriter
public static org.apache.lucene.index.IndexWriter indexWriter
-
indexConfig
public static org.apache.lucene.index.IndexWriterConfig indexConfig
-
indexDirectory
public static org.apache.lucene.store.Directory indexDirectory
-
searchAgent
public static SearchIndex searchAgent
-
-
Method Detail
-
getIndexWriter
public static org.apache.lucene.index.IndexWriter getIndexWriter(java.lang.String refsetId) throws java.io.IOExceptionReturnsIndexWriterobject.- Parameters:
refsetId- Identifier of Refset- Returns:
- object of
IndexWriter. - Throws:
java.io.IOException- if any error occurs while processing.
-
getIndexReader
public static org.apache.lucene.index.IndexReader getIndexReader(java.lang.String refsetId) throws java.io.IOExceptionReturnsIndexReaderobject.- Parameters:
refsetId- Identifier of Refset- Returns:
- instance of
IndexReader. - Throws:
java.io.IOException- if any error occurs while processing.
-
getIndexSearcher
public static org.apache.lucene.search.IndexSearcher getIndexSearcher(org.apache.lucene.index.IndexReader reader)
ReturnsIndexSearcherobject.- Parameters:
reader- instance ofIndexReader.- Returns:
IndexSearcher.
-
getAnalyzer
public static org.apache.lucene.analysis.Analyzer getAnalyzer()
ReturnsAnalyzerobject.- Returns:
Analyzer.
-
-