Package com.yahoo.search.query
Class Presentation
java.lang.Object
com.yahoo.search.query.Presentation
- All Implemented Interfaces:
Cloneable
Parameters deciding how the result of a query should be presented
- Author:
- Arne Bergene Fossaa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanstatic QueryProfileTypebooleanReturns whether matching query terms should be bolded in the result.Get the name of the format desired for result rendering.Returns how terms in this result should be highlighted, or null if not setcom.yahoo.component.ComponentSpecificationGet the name of the format desired for result rendering.Returns the name of the summary class to be used to present hits from this query, or null if not setReturn the set of explicitly requested fields.booleanReturns whether tensor content should be rendered directly, or inside a JSON object containing a "type" entry having the tensor type, and a "cells"/"values"/"blocks" entry (depending on type), having the tensor content.the current tensor format, see setTensorFormat()booleanwhether dense part of tensors should be represented as a string of hex digitsbooleanReturns whether tensors should use short form in JSON and textual representations, see https://docs.vespa.ai/en/reference/document-json-format.html#tensor.booleanReturns whether to add optional timing data to the rendered result.inthashCode()voidprepare()Prepares this for binary serialization.voidsetBolding(boolean bolding) Sets whether matching query terms should be bolded in the resultvoidSet the desired format for result rendering.voidsetHighlight(Highlight highlight) Sets how terms in this result should be highlighted.voidsetRenderer(com.yahoo.component.ComponentSpecification format) Set the desired format for result rendering.voidsetSummary(String summary) Sets the name of the summary class to be used to present hits from this queryvoidsetSummaryFields(String asString) Parse the given string as a comma delimited set of field names and overwrite the set of summary fields.voidsetTensorDirectValues(boolean tensorDirectValues) voidsetTensorFormat(String value) Sets whether tensors should use short form in JSON and textual representations from a string.voidsetTensorShortForm(boolean tensorShortForm) voidsetTensorShortForm(String value) Deprecated.use setTensorFormat().voidsetTiming(boolean timing)
-
Field Details
-
PRESENTATION
- See Also:
-
BOLDING
- See Also:
-
TIMING
- See Also:
-
SUMMARY
- See Also:
-
SUMMARY_FIELDS
- See Also:
-
TENSORS
- See Also:
-
FORMAT
The (short) name of the parameter holding the name of the return format to use- See Also:
-
-
Constructor Details
-
Presentation
-
-
Method Details
-
getArgumentType
-
getHighlight
Returns how terms in this result should be highlighted, or null if not set -
setHighlight
Sets how terms in this result should be highlighted. Set to null to turn highlighting off -
getSummary
Returns the name of the summary class to be used to present hits from this query, or null if not set -
setSummary
Sets the name of the summary class to be used to present hits from this query -
getBolding
public boolean getBolding()Returns whether matching query terms should be bolded in the result. Default is true. -
setBolding
public void setBolding(boolean bolding) Sets whether matching query terms should be bolded in the result -
getRenderer
public com.yahoo.component.ComponentSpecification getRenderer()Get the name of the format desired for result rendering. -
setRenderer
public void setRenderer(com.yahoo.component.ComponentSpecification format) Set the desired format for result rendering. If null, use the default renderer. -
getFormat
Get the name of the format desired for result rendering. -
setFormat
Set the desired format for result rendering. If null, use the default renderer. -
clone
-
getTiming
public boolean getTiming()Returns whether to add optional timing data to the rendered result. -
setTiming
public void setTiming(boolean timing) -
getSummaryFields
Return the set of explicitly requested fields. Returns an empty set if no fields are specified outside of summary classes. The returned set is mutable and fields may be added or removed before passing on the query.- Returns:
- the set of names of requested fields, never null
-
setSummaryFields
Parse the given string as a comma delimited set of field names and overwrite the set of summary fields. Whitespace will be trimmed. If you want to add or remove fields programmatically, usegetSummaryFields()and modify the returned set.- Parameters:
asString- the summary fields requested, e.g. "price,author,title"
-
getTensorShortForm
public boolean getTensorShortForm()Returns whether tensors should use short form in JSON and textual representations, see https://docs.vespa.ai/en/reference/document-json-format.html#tensor. Default is true. -
getTensorHexDense
public boolean getTensorHexDense()whether dense part of tensors should be represented as a string of hex digits -
getTensorFormat
the current tensor format, see setTensorFormat() -
setTensorShortForm
Deprecated.use setTensorFormat(). -
setTensorFormat
Sets whether tensors should use short form in JSON and textual representations from a string.- Parameters:
value- a string which must be either 'short' or 'long'- Throws:
IllegalArgumentException- if any other value is passed
-
setTensorShortForm
public void setTensorShortForm(boolean tensorShortForm) -
getTensorDirectValues
public boolean getTensorDirectValues()Returns whether tensor content should be rendered directly, or inside a JSON object containing a "type" entry having the tensor type, and a "cells"/"values"/"blocks" entry (depending on type), having the tensor content. See https://docs.vespa.ai/en/reference/document-json-format.html#tensor. Default is false: Render wrapped in a JSON object. -
setTensorDirectValues
public void setTensorDirectValues(boolean tensorDirectValues) -
prepare
public void prepare()Prepares this for binary serialization. For internal use - seeQuery.prepare() -
equals
-
hashCode
public int hashCode()
-