Interface I_CmsTermHighlighter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String getExcerpt​(org.apache.lucene.document.Document doc, CmsSearchIndex index, CmsSearchParameters params, org.apache.lucene.search.Query query, org.apache.lucene.analysis.Analyzer analyzer)
      Returns an excerpt of the given document related based on the given index and query.
    • Method Detail

      • getExcerpt

        java.lang.String getExcerpt​(org.apache.lucene.document.Document doc,
                                    CmsSearchIndex index,
                                    CmsSearchParameters params,
                                    org.apache.lucene.search.Query query,
                                    org.apache.lucene.analysis.Analyzer analyzer)
                             throws java.io.IOException,
                                    org.apache.lucene.search.highlight.InvalidTokenOffsetsException
        Returns an excerpt of the given document related based on the given index and query.

        Parameters:
        doc - the content Lucene document to generate the excerpt for
        index - the index that has been searched
        params - the current search parameters
        query - the search query
        analyzer - the analyzer used
        Returns:
        an excerpt of the content
        Throws:
        java.io.IOException - if something goes wrong
        org.apache.lucene.search.highlight.InvalidTokenOffsetsException - in case of problems with the Lucene tokenizer