FileDocCategorySizeDatePackage
ComplexExplanation.javaAPI DocApache Lucene 2.1.02345Wed Feb 14 10:46:40 GMT 2007org.apache.lucene.search

ComplexExplanation

public class ComplexExplanation extends Explanation
Expert: Describes the score computation for document and query, andcan distinguish a match independent of a positive value.

Fields Summary
private Boolean
match
Constructors Summary
public ComplexExplanation()

    super();
  
public ComplexExplanation(boolean match, float value, String description)

    // NOTE: use of "boolean" instead of "Boolean" in params is concious
    // choice to encourage clients to be specific.
    super(value, description);
    this.match = Boolean.valueOf(match);
  
Methods Summary
public java.lang.BooleangetMatch()
The match status of this explanation node.

return
May be null if match status is unknown

 return match; 
protected java.lang.StringgetSummary()

    if (null == getMatch())
      return super.getSummary();
    
    return getValue() + " = "
      + (isMatch() ? "(MATCH) " : "(NON-MATCH) ")
      + getDescription();
  
public booleanisMatch()
Indicates wether or not this Explanation models a good match.

If the match statis is explicitly set (ie: not null) this method uses it; otherwise it defers to the superclass.

see
#getMatch

    Boolean m = getMatch();
    return (null != m ? m.booleanValue() : super.isMatch());
  
public voidsetMatch(java.lang.Boolean match)
Sets the match status assigned to this explanation node.

param
match May be null if match status is unknown

 this.match = match;