Class WandItem

  • All Implemented Interfaces:
    TaggableItem, java.lang.Cloneable

    public class WandItem
    extends WeightedSetItem
    A weighted set query item to be evaluated as a Wand with dot product scoring. The dot product is calculated between the matched tokens of the weighted set field searched and the weights associated with the tokens of this WandItem. The resulting dot product will be available as a raw score in the rank framework.
    • Constructor Detail

      • WandItem

        public WandItem​(java.lang.String fieldName,
                        int targetNumHits)
        Creates an empty WandItem.
        fieldName - The name of the weighted set field to search with this WandItem.
        targetNumHits - The target for minimum number of hits to produce by the backend search operator handling this WandItem.
    • Method Detail

      • setScoreThreshold

        public void setScoreThreshold​(double scoreThreshold)
        Sets the initial score threshold used by the backend search operator handling this WandItem. The score of a document must be larger than this threshold in order to be considered a match. Default value is 0.0.
        scoreThreshold - the initial score threshold.
      • setThresholdBoostFactor

        public void setThresholdBoostFactor​(double thresholdBoostFactor)
        Sets the boost factor used by the backend search operator to boost the threshold before comparing it with the upper bound score of the document being evaluated. A large value of this factor results in fewer full evaluations and in an expected loss in precision. Similarly, a gain in performance might be expected. Default value is 1.0. NOTE: This boost factor is only used when this WandItem is searching a Vespa field.
        thresholdBoostFactor - the boost factor.
      • getTargetNumHits

        public int getTargetNumHits()
      • getScoreThreshold

        public double getScoreThreshold()
      • getThresholdBoostFactor

        public double getThresholdBoostFactor()
      • appendHeadingString

        protected void appendHeadingString​(java.lang.StringBuilder buffer)
        Description copied from class: Item
        Appends the heading of this string. As default getName() followed by a space.
        appendHeadingString in class Item
      • disclose

        public void disclose​( discloser)
        disclose in class WeightedSetItem