Class FieldCollapsingSearcher

  • All Implemented Interfaces:, java.lang.Comparable<>

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

      • Fields inherited from class

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Result search​(Query query, Execution execution)
      First fetch result from the next searcher in the chain.
      • Methods inherited from class

        getAnnotatedDependencies, getDefaultAnnotatedDependencies, getDependencies, initDependencies
      • Methods inherited from class

        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 Detail

      • FieldCollapsingSearcher

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

        public FieldCollapsingSearcher​(java.lang.String collapseField)
        Creates a collapser
        collapseField - the default field to collapse on, or null to not collapse as default
      • FieldCollapsingSearcher

        public FieldCollapsingSearcher​( config)
      • FieldCollapsingSearcher

        public FieldCollapsingSearcher​(int collapseSize,
                                       double extraFactor,
                                       java.lang.String collapseField)
        Creates a collapser
        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 Detail

      • 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
        query - the query
        the result of making this query