Package com.yahoo.vespa.documentmodel
Class SummaryField
java.lang.Object
com.yahoo.vespa.objects.FieldBase
com.yahoo.vespa.documentmodel.SummaryField
- All Implemented Interfaces:
Cloneable
A summary field
- Author:
- bratseth
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA source (field name).static enumThe command used when using data from this SummaryField to generate StreamingSummary config (vsmsummary). -
Constructor Summary
ConstructorsConstructorDescriptionSummaryField(com.yahoo.document.Field field, SummaryTransform transform, Object owner) SummaryField(com.yahoo.document.Field field, Object owner) Creates a summary field with NONE as transformSummaryField(String name, com.yahoo.document.DataType type, SummaryTransform transform, Object owner) SummaryField(String name, com.yahoo.document.DataType type, Object owner) Creates a summary field with NONE as transform -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDestination(String name) final voidaddDestinations(Iterable<String> names) voidaddSource(SummaryField.Source source) voidclone()static SummaryFieldcreateWithUnresolvedType(String name, DocumentSummary owner) com.yahoo.document.DataTypeReturns an modifiable view of the destination set owned by thisReturns the first source name of this, or the field name if no source has been setintReturns the first source field of this, or null if the source field is not presentReturns a modifiable set of the sources of thisbooleanReturns true if the summary field uses an explicit source, i.e.booleanbooleanbooleanmergeWith(SummaryField merge) Returns a summary field which merges the settings in the given field into this fieldvoidsetElementsSelector(SummaryElementsSelector selector) voidsetImplicit(boolean implicit) voidsetResolvedDataType(com.yahoo.document.DataType type) voidsetTransform(SummaryTransform transform) voidsetVsmCommand(SummaryField.VsmCommand vsmCommand) Returns a string which aids locating this field in the source schematoString()toString(Collection<?> collection) Methods inherited from class com.yahoo.vespa.objects.FieldBase
equals, getName, hashCode
-
Constructor Details
-
SummaryField
Creates a summary field with NONE as transform -
SummaryField
Creates a summary field with NONE as transform -
SummaryField
-
SummaryField
public SummaryField(String name, com.yahoo.document.DataType type, SummaryTransform transform, Object owner)
-
-
Method Details
-
createWithUnresolvedType
-
setImplicit
public void setImplicit(boolean implicit) -
isImplicit
public boolean isImplicit() -
hasUnresolvedType
public boolean hasUnresolvedType() -
getDataType
public com.yahoo.document.DataType getDataType() -
setElementsSelector
-
getElementsSelector
-
setTransform
-
getTransform
-
getSourceField
Returns the first source field of this, or null if the source field is not present -
addSource
-
addSource
-
sourceIterator
-
getSourceCount
public int getSourceCount() -
getSources
Returns a modifiable set of the sources of this -
getSingleSource
Returns the first source name of this, or the field name if no source has been set -
addDestination
-
addDestinations
-
getDestinations
Returns an modifiable view of the destination set owned by this -
toString
-
mergeWith
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
-
toString
- Overrides:
toStringin classcom.yahoo.vespa.objects.FieldBase
-
toLocateString
Returns a string which aids locating this field in the source schema -
clone
-
hasExplicitSingleSource
public boolean hasExplicitSingleSource()Returns true if the summary field uses an explicit source, i.e. a field with different name that is not a nested field. -
setResolvedDataType
public void setResolvedDataType(com.yahoo.document.DataType type) -
getVsmCommand
-
setVsmCommand
-