Class FieldCollapsingSearcher

java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.component.chain.ChainedComponent
com.yahoo.processing.Processor
com.yahoo.search.Searcher
com.yahoo.prelude.searcher.FieldCollapsingSearcher
All Implemented Interfaces:
com.yahoo.component.Component, com.yahoo.component.Deconstructable, Comparable<com.yahoo.component.Component>

public class FieldCollapsingSearcher extends Searcher
A searcher which does parametrized collapsing.
Author:
Steinar Knutsen
  • Field Summary

    Fields inherited from class com.yahoo.component.AbstractComponent

    isDeconstructable
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create this searcher using default values for all settings
    FieldCollapsingSearcher(int collapseSize, double extraFactor, String collapseField)
    Creates a collapser
    FieldCollapsingSearcher(com.yahoo.container.QrSearchersConfig config)
     
    Creates a collapser
  • Method Summary

    Modifier and Type
    Method
    Description
    search(Query query, Execution execution)
    First fetch result from the next searcher in the chain.

    Methods inherited from class com.yahoo.search.Searcher

    ensureFilled, fill, getLogger, process, toString

    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
  • Constructor Details

    • FieldCollapsingSearcher

      public FieldCollapsingSearcher()
      Create this searcher using default values for all settings
    • FieldCollapsingSearcher

      public FieldCollapsingSearcher(String collapseField)
      Creates a collapser
      Parameters:
      collapseField - the default field to collapse on, or null to not collapse as default
    • FieldCollapsingSearcher

      @Inject public FieldCollapsingSearcher(com.yahoo.container.QrSearchersConfig config)
    • FieldCollapsingSearcher

      public FieldCollapsingSearcher(int collapseSize, double extraFactor, String collapseField)
      Creates a collapser
      Parameters:
      collapseSize - the maximum number of hits to keep per field the default max number of hits in each collapsed group
      extraFactor - the percentage by which to scale up the requested number of hits, to allow some hits to be removed without refetching
      collapseField - the field to collapse on. This is currently ignored.
  • Method Details

    • search

      public Result search(Query query, Execution execution)
      First fetch result from the next searcher in the chain. If collapse is active, do collapsing. Otherwise, act as a simple pass through
      Specified by:
      search in class Searcher
      Parameters:
      query - the query
      Returns:
      the result of making this query