SimpleHTMLFormatter (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.highlight.SimpleHTMLFormatter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search.highlight
Class SimpleHTMLFormatter

    java.lang.Object
      org.apache.lucene.search.highlight.SimpleHTMLFormatter

All Implemented Interfaces:
  Formatter

    public class SimpleHTMLFormatter

extends Object
implements Formatter

Simple `Formatter` implementation to highlight terms with a pre and post tag

Constructor Summary
`SimpleHTMLFormatter()` Default constructor uses HTML: <B> tags to markup terms
`SimpleHTMLFormatter(String preTag, String postTag)`

Method Summary
`String` | `highlightTerm(String originalText, TokenGroup tokenGroup)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleHTMLFormatter

    public SimpleHTMLFormatter(String preTag,
                               String postTag)

### SimpleHTMLFormatter

    public SimpleHTMLFormatter()

  Default constructor uses HTML: <B> tags to markup terms

Method Detail

### highlightTerm

    public String highlightTerm(String originalText,
                                TokenGroup tokenGroup)

  Specified by:
    `highlightTerm` in interface `Formatter`
  Parameters:
    `originalText` - The section of text being considered for markup
    `tokenGroup` - contains one or several overlapping Tokens along with their scores and positions.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.