Package com.yahoo.vespa.documentmodel
Class DocumentSummary
- java.lang.Object
-
- com.yahoo.vespa.documentmodel.FieldView
-
- com.yahoo.vespa.documentmodel.DocumentSummary
-
- All Implemented Interfaces:
java.io.Serializable
public class DocumentSummary extends FieldView
A document summary definition - a list of summary fields.- Author:
- bratseth
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DocumentSummary(java.lang.String name)
Creates a DocumentSummary with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SummaryField summaryField)
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.DocumentSummary
getInherited()
Returns the parent of this, or null if none is inheritedSummaryField
getSummaryField(java.lang.String name)
java.util.Collection<SummaryField>
getSummaryFields()
boolean
isFromDisk()
Returns whether the user has noted explicitly that this summary accesses diskvoid
purgeImplicits()
Removes implicit fields which shouldn't be included.void
setFromDisk(boolean fromDisk)
void
setInherited(DocumentSummary inherited)
Sets the parent of this.java.lang.String
toString()
-
-
-
Method Detail
-
setFromDisk
public void setFromDisk(boolean fromDisk)
-
isFromDisk
public boolean isFromDisk()
Returns whether the user has noted explicitly that this summary accesses disk
-
add
public void add(SummaryField summaryField)
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:
summaryField
- The summaryfield to add
-
getSummaryField
public SummaryField getSummaryField(java.lang.String name)
-
getSummaryFields
public java.util.Collection<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.
-
setInherited
public void setInherited(DocumentSummary inherited)
Sets the parent of this. Both summaries must be present in the same search definition
-
getInherited
public DocumentSummary getInherited()
Returns the parent of this, or null if none is inherited
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-