Class DocsumDefinitionSet

java.lang.Object
com.yahoo.prelude.fastsearch.DocsumDefinitionSet

public final class DocsumDefinitionSet extends Object
A set of docsum definitions
Author:
bratseth, Bjørn Borud
  • Field Details

  • Constructor Details

    • DocsumDefinitionSet

      public DocsumDefinitionSet(Schema schema)
    • DocsumDefinitionSet

      public DocsumDefinitionSet(Collection<DocumentSummary> docsumDefinitions)
  • Method Details

    • getDocsum

      public DocsumDefinition getDocsum(String summaryClass)
      Returns the summary definition of the given name, or the default if not found.
      Throws:
      ConfigurationException - if the requested summary class is not found and there is none called "default"
    • hasDocsum

      public boolean hasDocsum(String summaryClass)
      Do we have a summary definition with the given name
    • lazyDecode

      public String lazyDecode(String summaryClass, byte[] data, FastHit hit)
      Makes data available for decoding for the given hit.
      Parameters:
      summaryClass - the requested summary class
      data - docsum data from backend
      hit - the Hit corresponding to this document summary
      Returns:
      Error message or null on success.
      Throws:
      ConfigurationException - if the summary class of this hit is missing
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • size

      public int size()