org.elasticsearch.search.highlight
Class HighlightField

java.lang.Object
  extended by org.elasticsearch.search.highlight.HighlightField
All Implemented Interfaces:
Streamable

public class HighlightField
extends Object
implements Streamable

A field highlighted with its highlighted fragments.


Constructor Summary
HighlightField(String name, Text[] fragments)
           
 
Method Summary
 Text[] fragments()
          The highlighted fragments.
 Text[] getFragments()
          The highlighted fragments.
 String getName()
          The name of the field highlighted.
 String name()
          The name of the field highlighted.
 void readFrom(StreamInput in)
           
static HighlightField readHighlightField(StreamInput in)
           
 String toString()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HighlightField

public HighlightField(String name,
                      Text[] fragments)
Method Detail

name

public String name()
The name of the field highlighted.


getName

public String getName()
The name of the field highlighted.


fragments

public Text[] fragments()
The highlighted fragments. null if failed to highlight (for example, the field is not stored).


getFragments

public Text[] getFragments()
The highlighted fragments. null if failed to highlight (for example, the field is not stored).


toString

public String toString()
Overrides:
toString in class Object

readHighlightField

public static HighlightField readHighlightField(StreamInput in)
                                         throws IOException
Throws:
IOException

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.