Package com.yahoo.prelude.fastsearch
Class DocsumDefinition
- java.lang.Object
-
- com.yahoo.prelude.fastsearch.DocsumDefinition
-
public class DocsumDefinition extends java.lang.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(java.lang.String name, java.util.List<DocsumField> fields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
convert(java.lang.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.java.util.Set<java.lang.String>
fieldNames()
DocsumField
getField(int fieldIndex)
Returns the field at this index, or null if noneDocsumField
getField(java.lang.String fieldName)
Returns the field with this name, or null if noneint
getFieldCount()
java.util.List<DocsumField>
getFields()
java.lang.String
getName()
boolean
isDynamic()
Returns whether this summary contains one or more dynamic fieldsjava.lang.String
toString()
-
-
-
Constructor Detail
-
DocsumDefinition
public DocsumDefinition(java.lang.String name, java.util.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(java.lang.String fieldName)
Returns the field with this name, or null if none
-
convert
public java.lang.Object convert(java.lang.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.
-
fieldNames
public java.util.Set<java.lang.String> fieldNames()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getName
public java.lang.String getName()
-
getFieldCount
public int getFieldCount()
-
getFields
public java.util.List<DocsumField> getFields()
-
isDynamic
public boolean isDynamic()
Returns whether this summary contains one or more dynamic fields
-
-