Package com.yahoo.vespa.documentmodel
Class SummaryField
java.lang.Object
com.yahoo.vespa.objects.FieldBase
com.yahoo.document.Field
com.yahoo.vespa.documentmodel.SummaryField
- All Implemented Interfaces:
com.yahoo.document.fieldset.FieldSet
,TypedKey
,Cloneable
,Comparable<com.yahoo.document.Field>
A summary field
- Author:
- bratseth
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A source (field name).static enum
The command used when using data from this SummaryField to generate StreamingSummary config (vsmsummary). -
Field Summary
Fields inherited from class com.yahoo.document.Field
dataType, fieldId
-
Constructor Summary
ConstructorDescriptionSummaryField
(com.yahoo.document.Field field) Creates a summary field with NONE as transformSummaryField
(com.yahoo.document.Field field, SummaryTransform transform) SummaryField
(String name, com.yahoo.document.DataType type) Creates a summary field with NONE as transformSummaryField
(String name, com.yahoo.document.DataType type, SummaryTransform transform) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDestination
(String name) final void
addDestinations
(Iterable<String> names) void
addSource
(SummaryField.Source source) void
clone()
static SummaryField
Returns 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 setint
Returns the first source field of this, or null if the source field is not presentReturns a modifiable set of the sources of thisboolean
Returns true if the summary field uses an explicit source, i.e.boolean
boolean
boolean
mergeWith
(SummaryField merge) Returns a summary field which merges the settings in the given field into this fieldvoid
setImplicit
(boolean implicit) void
setResolvedDataType
(com.yahoo.document.DataType type) void
setTransform
(SummaryTransform transform) void
setVsmCommand
(SummaryField.VsmCommand vsmCommand) Returns a string which aids locating this field in the source search definitiontoString()
toString
(Collection<?> collection) Methods inherited from class com.yahoo.document.Field
calculateIdV7, compareTo, contains, equals, getDataType, getId, hasForcedId, hashCode, setDataType, setId
Methods inherited from class com.yahoo.vespa.objects.FieldBase
getName
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.yahoo.schema.document.TypedKey
getDataType, getName, setDataType
-
Constructor Details
-
SummaryField
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
-
SummaryField
-
-
Method Details
-
createWithUnresolvedType
-
setImplicit
public void setImplicit(boolean implicit) -
isImplicit
public boolean isImplicit() -
hasUnresolvedType
public boolean hasUnresolvedType() -
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:
toString
in classcom.yahoo.document.Field
-
toLocateString
Returns a string which aids locating this field in the source search definition -
clone
- Specified by:
clone
in interfacecom.yahoo.document.fieldset.FieldSet
- Overrides:
clone
in classcom.yahoo.document.Field
-
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
-