Package com.yahoo.prelude.fastsearch
Class DocsumDefinitionSet
- java.lang.Object
-
- com.yahoo.prelude.fastsearch.DocsumDefinitionSet
-
public final class DocsumDefinitionSet extends java.lang.Object
A set of docsum definitions- Author:
- bratseth, Bjørn Borud
-
-
Field Summary
Fields Modifier and Type Field Description static int
SLIME_MAGIC_ID
-
Constructor Summary
Constructors Constructor Description DocsumDefinitionSet(DocumentdbInfoConfig.Documentdb config)
DocsumDefinitionSet(java.util.Collection<DocsumDefinition> docsumDefinitions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocsumDefinition
getDocsum(java.lang.String summaryClass)
Returns the summary definition of the given name, or the default if not found.java.lang.String
lazyDecode(java.lang.String summaryClass, byte[] data, FastHit hit)
Makes data available for decoding for the given hit.int
size()
java.lang.String
toString()
-
-
-
Field Detail
-
SLIME_MAGIC_ID
public static final int SLIME_MAGIC_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocsumDefinitionSet
public DocsumDefinitionSet(DocumentdbInfoConfig.Documentdb config)
-
DocsumDefinitionSet
public DocsumDefinitionSet(java.util.Collection<DocsumDefinition> docsumDefinitions)
-
-
Method Detail
-
getDocsum
public DocsumDefinition getDocsum(java.lang.String summaryClass)
Returns the summary definition of the given name, or the default if not found.- Throws:
ConfigurationException
- if the requested summary class is not found and there is none called "default"
-
lazyDecode
public final java.lang.String lazyDecode(java.lang.String summaryClass, byte[] data, FastHit hit)
Makes data available for decoding for the given hit.- Parameters:
summaryClass
- the requested summary classdata
- docsum data from backendhit
- the Hit corresponding to this document summary- Returns:
- Error message or null on success.
- Throws:
ConfigurationException
- if the summary class of this hit is missing
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
size
public int size()
-
-