org.opencms.search.documents
Class CmsTermHighlighterHtml

java.lang.Object
  extended by org.opencms.search.documents.CmsTermHighlighterHtml
All Implemented Interfaces:
I_CmsTermHighlighter

public class CmsTermHighlighterHtml
extends java.lang.Object
implements I_CmsTermHighlighter

Default highlighter implementation used for generation of search excerpts.

Since:
6.0.0
Version:
$Revision: 1.15 $
Author:
Alexander Kandzior

Constructor Summary
CmsTermHighlighterHtml()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsTermHighlighterHtml

public CmsTermHighlighterHtml()
Method Detail

getExcerpt

public 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
Description copied from interface: I_CmsTermHighlighter
Returns an excerpt of the given document related based on the given index and query.

Specified by:
getExcerpt in interface I_CmsTermHighlighter
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
See Also:
I_CmsTermHighlighter.getExcerpt(org.apache.lucene.document.Document, org.opencms.search.CmsSearchIndex, org.opencms.search.CmsSearchParameters, org.apache.lucene.search.Query, org.apache.lucene.analysis.Analyzer)