Package org.apache.lucene.search
Class Explanation
- java.lang.Object
-
- org.apache.lucene.search.Explanation
-
- Direct Known Subclasses:
ComplexExplanation
public class Explanation extends java.lang.ObjectExpert: Describes the score computation for document and query.
-
-
Constructor Summary
Constructors Constructor Description Explanation()Explanation(float value, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDetail(Explanation detail)Adds a sub-node to this explanation node.java.lang.StringgetDescription()A description of this explanation node.Explanation[]getDetails()The sub-nodes of this explanation node.floatgetValue()The value assigned to this explanation node.booleanisMatch()Indicates whether or not this Explanation models a good match.voidsetDescription(java.lang.String description)Sets the description of this explanation node.voidsetValue(float value)Sets the value assigned to this explanation node.java.lang.StringtoHtml()Render an explanation as HTML.java.lang.StringtoString()Render an explanation as text.
-
-
-
Method Detail
-
isMatch
public boolean isMatch()
Indicates whether or not this Explanation models a good match.By default, an Explanation represents a "match" if the value is positive.
- See Also:
getValue()
-
getValue
public float getValue()
The value assigned to this explanation node.
-
setValue
public void setValue(float value)
Sets the value assigned to this explanation node.
-
getDescription
public java.lang.String getDescription()
A description of this explanation node.
-
setDescription
public void setDescription(java.lang.String description)
Sets the description of this explanation node.
-
getDetails
public Explanation[] getDetails()
The sub-nodes of this explanation node.
-
addDetail
public void addDetail(Explanation detail)
Adds a sub-node to this explanation node.
-
toString
public java.lang.String toString()
Render an explanation as text.- Overrides:
toStringin classjava.lang.Object
-
toHtml
public java.lang.String toHtml()
Render an explanation as HTML.
-
-