TextFragment (Lucene 2.4.1 API)
Keywords: org.apache.lucene.search.highlight.TextFragment 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 TextFragment

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

    public class TextFragment

extends Object

Low-level class used to record information about a section of a document with a score.

Constructor Summary
`TextFragment(StringBuffer markedUpText, int textStartPos, int fragNum)`

Method Summary
`boolean` | `follows(TextFragment fragment)`
`int` | `getFragNum()`
`float` | `getScore()`
`void` | `merge(TextFragment frag2)`
`String` | `toString()`

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

Constructor Detail

### TextFragment

    public TextFragment(StringBuffer markedUpText,
                        int textStartPos,
                        int fragNum)

Method Detail

### getScore

    public float getScore()

### merge

    public void merge(TextFragment frag2)

  Parameters:
    `frag2` - Fragment to be merged into this one

### follows

    public boolean follows(TextFragment fragment)

  Parameters:
    `fragment` -
  Returns:
    true if this fragment follows the one passed

### getFragNum

    public int getFragNum()

  Returns:
    the fragment sequence number

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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.