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.SpanNearQuery |
buildQuery(List<String> queryTerms) |
protected org.apache.lucene.store.Directory |
createLuceneDirectory(JasperPrint jasperPrint) |
protected void |
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, org.apache.lucene.queryparser.classic.ParseException, JRException
IOException
org.apache.lucene.queryparser.classic.ParseException
JRException
protected org.apache.lucene.store.Directory createLuceneDirectory(JasperPrint jasperPrint) throws IOException, JRException
IOException
JRException
protected void indexPage(JRPrintPage page, int pageNo) throws IOException
IOException
protected void indexElements(int pageNo, List<JRPrintElement> elements) throws IOException
IOException
protected void addContentField(int pageNo, JRPrintText element) throws IOException
IOException
protected org.apache.lucene.analysis.Analyzer getConfiguredAnalyzer()
protected JRStyledText getStyledText(JRPrintText textElement)
protected org.apache.lucene.search.spans.SpanNearQuery buildQuery(List<String> queryTerms)
protected List<String> getQueryTerms(String queryString) throws IOException
IOException
protected void displayTokens(String text, String elementId) throws IOException
IOException
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) throws IOException
IOException
Copyright © 2017. All rights reserved.