org.apache.lucene.search

Class Explanation

public class Explanation extends Object implements Serializable

Expert: Describes the score computation for document and query.
Constructor Summary
Explanation()
Explanation(float value, String description)
Method Summary
voidaddDetail(Explanation detail)
Adds a sub-node to this explanation node.
StringgetDescription()
A description of this explanation node.
Explanation[]getDetails()
The sub-nodes of this explanation node.
protected StringgetSummary()
A short one line summary which should contain all high level information about this Explanation, without the "Details"
floatgetValue()
The value assigned to this explanation node.
booleanisMatch()
Indicates wether or not this Explanation models a good match.
voidsetDescription(String description)
Sets the description of this explanation node.
voidsetValue(float value)
Sets the value assigned to this explanation node.
StringtoHtml()
Render an explanation as HTML.
StringtoString()
Render an explanation as text.
protected StringtoString(int depth)

Constructor Detail

Explanation

public Explanation()

Explanation

public Explanation(float value, String description)

Method Detail

addDetail

public void addDetail(Explanation detail)
Adds a sub-node to this explanation node.

getDescription

public String getDescription()
A description of this explanation node.

getDetails

public Explanation[] getDetails()
The sub-nodes of this explanation node.

getSummary

protected String getSummary()
A short one line summary which should contain all high level information about this Explanation, without the "Details"

getValue

public float getValue()
The value assigned to this explanation node.

isMatch

public boolean isMatch()
Indicates wether or not this Explanation models a good match.

By default, an Explanation represents a "match" if the value is positive.

See Also: Explanation

setDescription

public void setDescription(String description)
Sets the description of this explanation node.

setValue

public void setValue(float value)
Sets the value assigned to this explanation node.

toHtml

public String toHtml()
Render an explanation as HTML.

toString

public String toString()
Render an explanation as text.

toString

protected String toString(int depth)
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.