Class Highlight
- java.lang.Object
- 
- com.lucidworks.search.dsl.DslBase
- 
- com.lucidworks.search.dsl.request.DslCloneable
- 
- com.lucidworks.search.dsl.request.Highlight
 
 
 
- 
 public class Highlight extends DslCloneable Specifies how matching document fragments ("highlights") are calculated and incorporated into the returned results.
- 
- 
Constructor SummaryConstructors Constructor Description Highlight(java.util.Collection<java.lang.String> fields, java.lang.String pre, java.lang.String post, java.lang.Integer length, java.lang.Integer count, java.lang.Boolean defaultHighlight)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Highlightclone()java.lang.IntegergetCount()java.lang.BooleangetDefaultHighlight()java.util.Collection<java.lang.String>getFields()java.lang.IntegergetLength()java.lang.StringgetPost()java.lang.StringgetPre()voidsetCount(java.lang.Integer count)voidsetDefaultHighlight(java.lang.Boolean defaultHighlight)voidsetFields(java.util.Collection<java.lang.String> fields)voidsetLength(java.lang.Integer length)voidsetPost(java.lang.String post)voidsetPre(java.lang.String pre)- 
Methods inherited from class com.lucidworks.search.dsl.request.DslCloneableclone, deepClone
 
- 
 
- 
- 
- 
Method Detail- 
getFieldspublic java.util.Collection<java.lang.String> getFields() - Returns:
- the fields to consider for highlighting. Wildcard-based values ("*", "text_lang_*", etc.) are allowed but should be used carefully to avoid impacting performance.
 
 - 
setFieldspublic void setFields(java.util.Collection<java.lang.String> fields) 
 - 
getLengthpublic java.lang.Integer getLength() - Returns:
- the target size for highlight fragments, in characters. "0" is treated as a flag value to indicate that the entire field value should be used as the fragment. Defaults to "100" if not specified.
 
 - 
setLengthpublic void setLength(java.lang.Integer length) 
 - 
getCountpublic java.lang.Integer getCount() - Returns:
- the number of highlight fragments to attempt to generate per field. Defaults to 1.
 
 - 
setCountpublic void setCount(java.lang.Integer count) 
 - 
getDefaultHighlightpublic java.lang.Boolean getDefaultHighlight() - Returns:
- whether or not a default highlight fragment should be included where none could be generated. Defaults to false.
 
 - 
setDefaultHighlightpublic void setDefaultHighlight(java.lang.Boolean defaultHighlight) 
 - 
getPrepublic java.lang.String getPre() - Returns:
- the text that will be prepended to each highlighted fragment. Typically a HTML or XML opening tag, though any string may be used. Defaults to <em>
 
 - 
setPrepublic void setPre(java.lang.String pre) 
 - 
getPostpublic java.lang.String getPost() - Returns:
- the text that will be appended to each highlighted fragment. Typically a HTML or XML closing tag, though any string may be used. Defaults to </em>
 
 - 
setPostpublic void setPost(java.lang.String post) 
 - 
clonepublic Highlight clone() - Specified by:
- clonein class- DslCloneable
 
 
- 
 
-