Class UniqueGroupingSearcher

  • All Implemented Interfaces:
    com.yahoo.component.Component, com.yahoo.component.Deconstructable, java.lang.Comparable<com.yahoo.component.Component>

    public class UniqueGroupingSearcher
    extends Searcher
    Implements 'unique' using a grouping expression. It doesn't work for multi-level sorting.
    Author:
    andreer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.yahoo.processing.request.CompoundName PARAM_UNIQUE  
      • Fields inherited from class com.yahoo.component.AbstractComponent

        isDeconstructable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Result search​(Query query, Execution execution)
      Implements the deprecated "unique" api for deduplication by using grouping.
      • Methods inherited from class com.yahoo.component.chain.ChainedComponent

        getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies
      • Methods inherited from class com.yahoo.component.AbstractComponent

        clone, compareTo, deconstruct, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • PARAM_UNIQUE

        public static final com.yahoo.processing.request.CompoundName PARAM_UNIQUE
    • Constructor Detail

      • UniqueGroupingSearcher

        public UniqueGroupingSearcher()
    • Method Detail

      • search

        public Result search​(Query query,
                             Execution execution)
        Implements the deprecated "unique" api for deduplication by using grouping. We create a grouping expression on the field we wish to dedup on (which must be an attribute). Total hits is calculated using the new count unique groups functionality.
        Specified by:
        search in class Searcher
        Parameters:
        query - the query
        Returns:
        the result of making this query