Class DisjunctionMaxQuery.DisjunctionMaxWeight

  • All Implemented Interfaces:
    Serializable
    Enclosing class:
    DisjunctionMaxQuery

    protected class DisjunctionMaxQuery.DisjunctionMaxWeight
    extends Weight
    Expert: the Weight for DisjunctionMaxQuery, used to normalize, score and explain these queries.

    NOTE: this API and implementation is subject to change suddenly in the next release.

    See Also:
    Serialized Form
    • Field Detail

      • similarity

        protected Similarity similarity
        The Similarity implementation.
      • weights

        protected ArrayList<Weight> weights
        The Weights for our subqueries, in 1-1 correspondence with disjuncts
    • Constructor Detail

      • DisjunctionMaxWeight

        public DisjunctionMaxWeight​(Searcher searcher)
                             throws IOException
        Construct the Weight for this Query searched by searcher. Recursively construct subquery weights.
        Throws:
        IOException
    • Method Detail

      • getQuery

        public Query getQuery()
        Return our associated DisjunctionMaxQuery
        Specified by:
        getQuery in class Weight
      • getValue

        public float getValue()
        Return our boost
        Specified by:
        getValue in class Weight
      • sumOfSquaredWeights

        public float sumOfSquaredWeights()
                                  throws IOException
        Compute the sub of squared weights of us applied to our subqueries. Used for normalization.
        Specified by:
        sumOfSquaredWeights in class Weight
        Throws:
        IOException
      • normalize

        public void normalize​(float norm)
        Apply the computed normalization factor to our subqueries
        Specified by:
        normalize in class Weight