Package net.sf.jasperreports.search
Class LuceneUtil
java.lang.Object
net.sf.jasperreports.search.LuceneUtil
- Author:
- Narcis Marcu (narcism@users.sourceforge.net)
-
Constructor Summary
ConstructorsConstructorDescriptionLuceneUtil(JasperReportsContext jasperReportsContext, boolean isCaseSensitive, boolean isWholeWordsOnly, boolean removeAccents) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddContentField(int pageNo, JRPrintText element) protected org.apache.lucene.search.spans.SpanQuerybuildQuery(List<String> queryTerms) protected org.apache.lucene.store.DirectorycreateLuceneDirectory(JasperPrint jasperPrint) protected StringdisplayTokens(String text, String elementId) protected org.apache.lucene.analysis.Analyzerprotected voidgetHitTerms(org.apache.lucene.search.Query query, org.apache.lucene.search.IndexSearcher searcher, int docId, Set<org.apache.lucene.index.Term> hitTerms) getQueryTerms(String queryString) getSpansInfo(JasperPrint jasperPrint, String queryString) protected JRStyledTextgetStyledText(JRPrintText textElement) protected voidindexElements(int pageNo, List<JRPrintElement> elements) protected voidindexPage(JRPrintPage page, int pageNo) protected voidvalidateHitTerms(List<HitTermInfo> hitTermInfoList, List<String> queryTerms, String uid, String pageNo, SpansInfo spansInfo)
-
Constructor Details
-
LuceneUtil
public LuceneUtil(JasperReportsContext jasperReportsContext, boolean isCaseSensitive, boolean isWholeWordsOnly, boolean removeAccents)
-
-
Method Details
-
getSpansInfo
public SpansInfo getSpansInfo(JasperPrint jasperPrint, String queryString) throws IOException, JRException - Throws:
IOExceptionJRException
-
validateHitTerms
-
createLuceneDirectory
protected org.apache.lucene.store.Directory createLuceneDirectory(JasperPrint jasperPrint) throws IOException, JRException - Throws:
IOExceptionJRException
-
indexPage
- Throws:
IOException
-
indexElements
- Throws:
IOException
-
addContentField
- Throws:
IOException
-
getConfiguredAnalyzer
protected org.apache.lucene.analysis.Analyzer getConfiguredAnalyzer() -
getStyledText
-
buildQuery
-
getQueryTerms
- Throws:
IOException
-
displayTokens
- Throws:
IOException
-
getHitTerms
protected void getHitTerms(org.apache.lucene.search.Query query, org.apache.lucene.search.IndexSearcher searcher, int docId, Set<org.apache.lucene.index.Term> hitTerms) throws IOException - Throws:
IOException
-