Package org.opencms.jsp.search.config
Class CmsSearchConfigurationHighlighting
- java.lang.Object
-
- org.opencms.jsp.search.config.CmsSearchConfigurationHighlighting
-
- All Implemented Interfaces:
I_CmsSearchConfigurationHighlighting
public class CmsSearchConfigurationHighlighting extends java.lang.Object implements I_CmsSearchConfigurationHighlighting
Search configuration for highlighting options.
-
-
Constructor Summary
Constructors Constructor Description CmsSearchConfigurationHighlighting(java.lang.String field, java.lang.Integer snippetCount, java.lang.Integer fragSize, java.lang.String alternateField, java.lang.Integer maxAlternateFieldLength, java.lang.String pre, java.lang.String post, java.lang.String formatter, java.lang.String fragmenter, java.lang.Boolean useFastVectorHighlighting)
The constructor setting all configuration values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlternateHighlightField()
Returns the index field whose content should be used if no highlighting snippet is available.java.lang.String
getFormatter()
Returns the formatter that should be used for highlighting.java.lang.String
getFragmenter()
Returns the fragmenter that should be used for highlighting.java.lang.Integer
getFragSize()
Returns the maximal size a highlighted snippet should have.java.lang.String
getHightlightField()
Returns the index field that should be used for highlighting.java.lang.Integer
getMaxAlternateHighlightFieldLength()
Returns the maximal length of the snippet that should be shown from the alternative field, if no highlighting snippet was found.java.lang.String
getSimplePost()
Returns the String that should be inserted directly after the term that should be highlighted.java.lang.String
getSimplePre()
Returns the String that should be inserted directly in front of the term that should be highlighted.java.lang.Integer
getSnippetsCount()
Returns the number of highlighted snippets that should be returned.java.lang.Boolean
getUseFastVectorHighlighting()
Returns the flag, that indicates if fast vector highlighting should be used.
-
-
-
Constructor Detail
-
CmsSearchConfigurationHighlighting
public CmsSearchConfigurationHighlighting(java.lang.String field, java.lang.Integer snippetCount, java.lang.Integer fragSize, java.lang.String alternateField, java.lang.Integer maxAlternateFieldLength, java.lang.String pre, java.lang.String post, java.lang.String formatter, java.lang.String fragmenter, java.lang.Boolean useFastVectorHighlighting)
The constructor setting all configuration values.- Parameters:
field
- The fields that should be used for highlighting. (Solr: hl.fl)snippetCount
- The number of snippets to return. (Solr: hl.snippets)fragSize
- The size of a snippet (in letters). (Solr: hl.fragsize)alternateField
- A field that should be displayed if no highlighting snippet is found. (Solr: hl.alternateField)maxAlternateFieldLength
- The maximal length of the snippet shown from the alternative field (in letters). (Solr: hl.maxAlternateFieldLength)pre
- The String added in front of the highlighted part. (Solr: hl.simple.pre)post
- The String added behind the highlighted part. (Solr: hl.simple.post)formatter
- The formatter used for highlighting. (Solr: hl.formatter)fragmenter
- The fragmenter used for highlighting. (Solr: hl.fragmenter)useFastVectorHighlighting
- Flag, indicating if fast vector highlighting should be used. (Solr: hl.useFastVectorHighlighting)
-
-
Method Detail
-
getAlternateHighlightField
public java.lang.String getAlternateHighlightField()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the index field whose content should be used if no highlighting snippet is available.- Specified by:
getAlternateHighlightField
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The index field whose content should be used if no highlighting snippet is available. (Solr: hl.alternateField)
- See Also:
I_CmsSearchConfigurationHighlighting.getAlternateHighlightField()
-
getFormatter
public java.lang.String getFormatter()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the formatter that should be used for highlighting.- Specified by:
getFormatter
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The formatter that should be used for highlighting. (Solr: hl.formatter)
- See Also:
I_CmsSearchConfigurationHighlighting.getFormatter()
-
getFragmenter
public java.lang.String getFragmenter()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the fragmenter that should be used for highlighting.- Specified by:
getFragmenter
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The fragmenter that should be used for highlighting. (Solr: hl.fragmenter)
- See Also:
I_CmsSearchConfigurationHighlighting.getFragmenter()
-
getFragSize
public java.lang.Integer getFragSize()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the maximal size a highlighted snippet should have.- Specified by:
getFragSize
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The maximal size a highlighted snippet should have. (Solr: hl.fragsize)
- See Also:
I_CmsSearchConfigurationHighlighting.getFragSize()
-
getHightlightField
public java.lang.String getHightlightField()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the index field that should be used for highlighting.- Specified by:
getHightlightField
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The index field that should be used for highlighting.
- See Also:
I_CmsSearchConfigurationHighlighting.getHightlightField()
-
getMaxAlternateHighlightFieldLength
public java.lang.Integer getMaxAlternateHighlightFieldLength()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the maximal length of the snippet that should be shown from the alternative field, if no highlighting snippet was found.- Specified by:
getMaxAlternateHighlightFieldLength
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The maximal length of the snippet that should be shown from the alternative field, if no highlighting snippet was found. (Solr: hl.maxAlternateFieldLength)
- See Also:
I_CmsSearchConfigurationHighlighting.getMaxAlternateHighlightFieldLength()
-
getSimplePost
public java.lang.String getSimplePost()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the String that should be inserted directly after the term that should be highlighted.- Specified by:
getSimplePost
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The String that should be inserted directly after the term that should be highlighted. (Solr: hl.simple.post)
- See Also:
I_CmsSearchConfigurationHighlighting.getSimplePost()
-
getSimplePre
public java.lang.String getSimplePre()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the String that should be inserted directly in front of the term that should be highlighted.- Specified by:
getSimplePre
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The String that should be inserted directly in front the term that should be highlighted. (Solr: hl.simple.pre)
- See Also:
I_CmsSearchConfigurationHighlighting.getSimplePre()
-
getSnippetsCount
public java.lang.Integer getSnippetsCount()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the number of highlighted snippets that should be returned.- Specified by:
getSnippetsCount
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The number of highlighted snippets that should be returned. (Solr: hl.snippets)
- See Also:
I_CmsSearchConfigurationHighlighting.getSnippetsCount()
-
getUseFastVectorHighlighting
public java.lang.Boolean getUseFastVectorHighlighting()
Description copied from interface:I_CmsSearchConfigurationHighlighting
Returns the flag, that indicates if fast vector highlighting should be used.- Specified by:
getUseFastVectorHighlighting
in interfaceI_CmsSearchConfigurationHighlighting
- Returns:
- The flag, that indicates if fast vector highlighting should be used. (Solr: hl.useFastVectorHighlighting)
- See Also:
I_CmsSearchConfigurationHighlighting.getUseFastVectorHighlighting()
-
-