Class HitsAggregationResult

    • Field Detail

      • classId

        public static final int classId
    • Constructor Detail

      • HitsAggregationResult

        public HitsAggregationResult()
        Constructs an empty result node.
      • HitsAggregationResult

        public HitsAggregationResult​(int maxHits)
        Create a hits aggregation result that will collect the given number of hits
        Parameters:
        maxHits - maximum number of hits to collect
      • HitsAggregationResult

        public HitsAggregationResult​(int maxHits,
                                     String summaryClass)
        Create a hits aggregation result that will collect the given number of hits of the summaryClass asked.
        Parameters:
        maxHits - maximum number of hits to collect
        summaryClass - SummaryClass to use for hits to collect
    • Method Detail

      • getSummaryClass

        public String getSummaryClass()
        Obtain the summary class used to collect the hits.
        Returns:
        The summary class id.
      • getMaxHits

        public int getMaxHits()
        Obtain the maximum number of hits to collect.
        Returns:
        Max number of hits to collect.
      • setSummaryClass

        public HitsAggregationResult setSummaryClass​(String summaryClass)
        Sets the summary class of hits to collect.
        Parameters:
        summaryClass - the summary class to collect.
        Returns:
        this, to allow chaining.
      • setMaxHits

        public HitsAggregationResult setMaxHits​(int maxHits)
        Sets the maximum number of hits to collect.
        Parameters:
        maxHits - the number of hits to collect.
        Returns:
        this, to allow chaining.
      • getHits

        public List<Hit> getHits()
        Obtain the hits collected by this aggregation result
        Returns:
        collected hits
      • addHit

        public HitsAggregationResult addHit​(Hit h)
        Adds a hit to this aggregation result
        Parameters:
        h - the hit
        Returns:
        this object
      • postMerge

        public void postMerge()
        Description copied from class: AggregationResult
        Hook called when all aggregation results have been merged. This method can be overloaded by subclasses that need special behaviour to occur after merge.
        Overrides:
        postMerge in class AggregationResult
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.yahoo.vespa.objects.Identifiable
      • visitMembers

        public void visitMembers​(com.yahoo.vespa.objects.ObjectVisitor visitor)
        Overrides:
        visitMembers in class AggregationResult
      • selectMembers

        public void selectMembers​(com.yahoo.vespa.objects.ObjectPredicate predicate,
                                  com.yahoo.vespa.objects.ObjectOperation operation)
        Overrides:
        selectMembers in class com.yahoo.vespa.objects.Selectable