Package com.yahoo.prelude.fastsearch
Class DocsumDefinition
- java.lang.Object
-
- com.yahoo.prelude.fastsearch.DocsumDefinition
-
public class DocsumDefinition extends Object
A docsum definition which knows how to decode a certain class of document summaries. The docsum definition has a name and a list of field definitions- Author:
- bratseth, Bjørn Borud
-
-
Constructor Summary
Constructors Constructor Description DocsumDefinition(String name, List<DocsumField> fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
convert(String fieldName, com.yahoo.data.access.Inspector value)
Returns the given slime value as the type specified in this, or null if the type is not known.Set<String>
fieldNames()
DocsumField
getField(int fieldIndex)
Returns the field at this index, or null if noneDocsumField
getField(String fieldName)
Returns the field with this name, or null if noneint
getFieldCount()
List<DocsumField>
getFields()
String
getName()
boolean
isDynamic()
Returns whether this summary contains one or more dynamic fieldsString
toString()
-
-
-
Constructor Detail
-
DocsumDefinition
public DocsumDefinition(String name, List<DocsumField> fields)
-
-
Method Detail
-
getField
public DocsumField getField(int fieldIndex)
Returns the field at this index, or null if none
-
getField
public DocsumField getField(String fieldName)
Returns the field with this name, or null if none
-
convert
public Object convert(String fieldName, com.yahoo.data.access.Inspector value)
Returns the given slime value as the type specified in this, or null if the type is not known. Even in a correctly configured system we may encounter field names for which we do not know the type, in the time period when a configuration is changing and one node has received the new configuration and another has not.
-
getName
public String getName()
-
getFieldCount
public int getFieldCount()
-
getFields
public List<DocsumField> getFields()
-
isDynamic
public boolean isDynamic()
Returns whether this summary contains one or more dynamic fields
-
-