Class DocumentSummary

java.lang.Object
com.yahoo.vespa.documentmodel.DocumentSummary

public class DocumentSummary extends Object
A document summary definition - a list of summary fields.
Author:
bratseth
  • Constructor Details

    • DocumentSummary

      public DocumentSummary(String name, Schema owner)
      Creates a DocumentSummary with the given name.
  • Method Details

    • name

      public String name()
    • owner

      public Schema owner()
    • values

      public Collection<SummaryField> values()
    • get

      public SummaryField get(String name)
    • remove

      public void remove(String name)
    • add

      public DocumentSummary add(SummaryField field)
      Adds a field to this. The model is constrained to ensure that summary fields of the same name in different classes have the same summary transform, because this is what is supported by the backend currently.
      Parameters:
      field - the summary field to add
      Returns:
      this for chaining
    • add

      public DocumentSummary add(DocumentSummary other)
      Adds another set of fields to this.
      Parameters:
      other - the fields to be added to this
      Returns:
      this for chaining
    • setFromDisk

      public void setFromDisk(boolean fromDisk)
    • isFromDisk

      public boolean isFromDisk()
      Returns whether the user has noted explicitly that this summary accesses disk
    • setOmitSummaryFeatures

      public void setOmitSummaryFeatures(boolean value)
    • omitSummaryFeatures

      public boolean omitSummaryFeatures()
    • getSummaryField

      public SummaryField getSummaryField(String name)
    • getSummaryFields

      public Map<String,SummaryField> getSummaryFields()
    • purgeImplicits

      public void purgeImplicits()
      Removes implicit fields which shouldn't be included. This is implicitly added fields which are sources for other fields. We then assume they are not intended to be added implicitly in addition. This should be called when this summary is complete.
    • addInherited

      public void addInherited(String inherited)
      Adds a parent of this. Both summaries must be present in the same schema, or a parent schema.
    • inherited

      public List<DocumentSummary> inherited()
      Returns the parent of this, if any
    • toString

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

      public void validate(com.yahoo.config.application.api.DeployLogger logger)