public class LuceneUtil extends Object
| Constructor and Description |
|---|
LuceneUtil(JasperReportsContext jasperReportsContext,
boolean isCaseSensitive,
boolean isWholeWordsOnly,
boolean removeAccents) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addContentField(int pageNo,
JRPrintText element) |
protected org.apache.lucene.search.spans.SpanQuery |
buildQuery(List<String> queryTerms) |
protected org.apache.lucene.store.Directory |
createLuceneDirectory(JasperPrint jasperPrint) |
protected String |
displayTokens(String text,
String elementId) |
protected org.apache.lucene.analysis.Analyzer |
getConfiguredAnalyzer() |
protected void |
getHitTerms(org.apache.lucene.search.Query query,
org.apache.lucene.search.IndexSearcher searcher,
int docId,
Map<Integer,List<org.apache.lucene.index.Term>> hitTerms) |
protected List<String> |
getQueryTerms(String queryString) |
SpansInfo |
getSpansInfo(JasperPrint jasperPrint,
String queryString) |
protected JRStyledText |
getStyledText(JRPrintText textElement) |
protected void |
indexElements(int pageNo,
List<JRPrintElement> elements) |
protected void |
indexPage(JRPrintPage page,
int pageNo) |
public LuceneUtil(JasperReportsContext jasperReportsContext, boolean isCaseSensitive, boolean isWholeWordsOnly, boolean removeAccents)
public SpansInfo getSpansInfo(JasperPrint jasperPrint, String queryString) throws IOException, JRException
IOExceptionJRExceptionprotected org.apache.lucene.store.Directory createLuceneDirectory(JasperPrint jasperPrint) throws IOException, JRException
IOExceptionJRExceptionprotected void indexPage(JRPrintPage page, int pageNo) throws IOException
IOExceptionprotected void indexElements(int pageNo,
List<JRPrintElement> elements)
throws IOException
IOExceptionprotected void addContentField(int pageNo,
JRPrintText element)
throws IOException
IOExceptionprotected org.apache.lucene.analysis.Analyzer getConfiguredAnalyzer()
protected JRStyledText getStyledText(JRPrintText textElement)
protected List<String> getQueryTerms(String queryString) throws IOException
IOExceptionprotected String displayTokens(String text, String elementId) throws IOException
IOExceptionprotected void getHitTerms(org.apache.lucene.search.Query query,
org.apache.lucene.search.IndexSearcher searcher,
int docId,
Map<Integer,List<org.apache.lucene.index.Term>> hitTerms)
throws IOException
IOExceptionCopyright © 2019 TIBCO Software Inc.. All rights reserved.