Class Snippet

org.apache.lucene.search.uhighlight.Snippet

public class Snippet extends
Represents a scored highlighted snippet. It's our own arbitrary object that we get back from the unified highlighter when highlighting a document. Every snippet contains its formatted text and its score. The score is needed in case we want to sort snippets by score, they get sorted by position in the text by default.
  • Constructor Summary

    Constructors
    Constructor
    Description
     text, float score, boolean isHighlighted)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
     
    boolean
     

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Constructor Details

    • Snippet

      public Snippet( text, float score, boolean isHighlighted)
  • Method Details

    • getText

      public  getText()
    • getScore

      public float getScore()
    • isHighlighted

      public boolean isHighlighted()