net.sf.jasperreports.search

## Class LuceneUtil

- java.lang.Object
- - net.sf.jasperreports.search.LuceneUtil

-     public class LuceneUtil
      extends java.lang.Object

  Version:
    $Id$
  Author:
    Narcis Marcu (narcism@users.sourceforge.net)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LuceneUtil(JasperReportsContext jasperReportsContext, boolean isCaseSensitive, boolean isWholeWordsOnly, boolean removeAccents)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addContentField(int pageNo, JRPrintText element)`
    `protected org.apache.lucene.search.spans.SpanNearQuery` | `buildQuery(java.util.List<java.lang.String> queryTerms)`
    `protected org.apache.lucene.store.Directory` | `createLuceneDirectory(JasperPrint jasperPrint)`
    `protected void` | `displayTokens(java.lang.String text, java.lang.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, java.util.Map<java.lang.Integer,java.util.List<org.apache.lucene.index.Term>> hitTerms)`
    `protected java.util.List<java.lang.String>` | `getQueryTerms(java.lang.String queryString)`
    `SpansInfo` | `getSpansInfo(JasperPrint jasperPrint, java.lang.String queryString)`
    `protected JRStyledText` | `getStyledText(JRPrintText textElement)`
    `protected void` | `indexElements(int pageNo, java.util.List<JRPrintElement> elements)`
    `protected void` | `indexPage(JRPrintPage page, int pageNo)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LuceneUtil

          public LuceneUtil(JasperReportsContext jasperReportsContext,
                    boolean isCaseSensitive,
                    boolean isWholeWordsOnly,
                    boolean removeAccents)

  - ### Method Detail

    - #### getSpansInfo

          public SpansInfo getSpansInfo(JasperPrint jasperPrint,
                               java.lang.String queryString)
                                 throws java.io.IOException,
                                        org.apache.lucene.queryparser.classic.ParseException,
                                        JRException

      Throws:
        `java.io.IOException`
        `org.apache.lucene.queryparser.classic.ParseException`
        `JRException`

    - #### createLuceneDirectory

          protected org.apache.lucene.store.Directory createLuceneDirectory(JasperPrint jasperPrint)
                                                                     throws java.io.IOException,
                                                                            JRException

      Throws:
        `java.io.IOException`
        `JRException`

    - #### indexPage

          protected void indexPage(JRPrintPage page,
                       int pageNo)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### indexElements

          protected void indexElements(int pageNo,
                           java.util.List<JRPrintElement> elements)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addContentField

          protected void addContentField(int pageNo,
                             JRPrintText element)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getConfiguredAnalyzer

          protected org.apache.lucene.analysis.Analyzer getConfiguredAnalyzer()

    - #### getStyledText

          protected JRStyledText getStyledText(JRPrintText textElement)

    - #### buildQuery

          protected org.apache.lucene.search.spans.SpanNearQuery buildQuery(java.util.List<java.lang.String> queryTerms)

    - #### getQueryTerms

          protected java.util.List<java.lang.String> getQueryTerms(java.lang.String queryString)
                                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### displayTokens

          protected void displayTokens(java.lang.String text,
                           java.lang.String elementId)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getHitTerms

          protected void getHitTerms(org.apache.lucene.search.Query query,
                         org.apache.lucene.search.IndexSearcher searcher,
                         int docId,
                         java.util.Map<java.lang.Integer,java.util.List<org.apache.lucene.index.Term>> hitTerms)
                              throws java.io.IOException

      Throws:
        `java.io.IOException`

© 2001-2010 Jaspersoft Corporation www.jaspersoft.com