Class SummaryField

    • Constructor Detail

      • SummaryField

        public SummaryField​(String name,
                            com.yahoo.document.DataType type)
        Creates a summary field with NONE as transform
      • SummaryField

        public SummaryField​(com.yahoo.document.Field field)
        Creates a summary field with NONE as transform
      • SummaryField

        public SummaryField​(com.yahoo.document.Field field,
                            SummaryTransform transform)
      • SummaryField

        public SummaryField​(String name,
                            com.yahoo.document.DataType type,
                            SummaryTransform transform)
    • Method Detail

      • setImplicit

        public void setImplicit​(boolean implicit)
      • isImplicit

        public boolean isImplicit()
      • getSourceField

        public String getSourceField()
        Returns the first source field of this, or null if the source field is not present
      • addSource

        public void addSource​(String name)
      • getSourceCount

        public int getSourceCount()
      • getSingleSource

        public String getSingleSource()
        Returns the first source name of this, or the field name if no source has been set
      • addDestination

        public void addDestination​(String name)
      • addDestinations

        public final void addDestinations​(Iterable<String> names)
      • getDestinations

        public Set<String> getDestinations()
        Returns an modifiable view of the destination set owned by this
      • mergeWith

        public SummaryField mergeWith​(SummaryField merge)
        Returns a summary field which merges the settings in the given field into this field
        Parameters:
        merge - the field to merge with this, if null, the merged field is this field
        Throws:
        RuntimeException - if the two fields can not be merged
      • hasSource

        public boolean hasSource​(String name)
      • toString

        public String toString()
        Overrides:
        toString in class com.yahoo.document.Field
      • toLocateString

        public String toLocateString()
        Returns a string which aids locating this field in the source search definition
      • clone

        public SummaryField clone()
        Specified by:
        clone in interface com.yahoo.document.fieldset.FieldSet
        Overrides:
        clone in class com.yahoo.document.Field
      • addProperty

        public void addProperty​(String name,
                                String value)
        Adds a property to this summary field