org.apache.lucene.search

Class Explanation



  • public final class Explanation
    extends Object
    Expert: Describes the score computation for document and query.
    • Method Detail

      • match

        public static Explanation match(float value,
                                        String description,
                                        Collection<Explanation> details)
        Create a new explanation for a match.
        Parameters:
        value - the contribution to the score of the document
        description - how value was computed
        details - sub explanations that contributed to this explanation
      • match

        public static Explanation match(float value,
                                        String description,
                                        Explanation... details)
        Create a new explanation for a match.
        Parameters:
        value - the contribution to the score of the document
        description - how value was computed
        details - sub explanations that contributed to this explanation
      • isMatch

        public boolean isMatch()
        Indicates whether or not this Explanation models a match.
      • getValue

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