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 Object
implements I_CmsSearchConfigurationHighlighting
Search configuration for highlighting options.
-
Constructor Summary
ConstructorDescriptionCmsSearchConfigurationHighlighting
(String field, Integer snippetCount, Integer fragSize, String alternateField, Integer maxAlternateFieldLength, String pre, String post, String formatter, String fragmenter, Boolean useFastVectorHighlighting) The constructor setting all configuration values. -
Method Summary
Modifier and TypeMethodDescriptionReturns the index field whose content should be used if no highlighting snippet is available.Returns the formatter that should be used for highlighting.Returns the fragmenter that should be used for highlighting.Returns the maximal size a highlighted snippet should have.Returns the index field that should be used for highlighting.Returns the maximal length of the snippet that should be shown from the alternative field, if no highlighting snippet was found.Returns the String that should be inserted directly after the term that should be highlighted.Returns the String that should be inserted directly in front of the term that should be highlighted.Returns the number of highlighted snippets that should be returned.Returns the flag, that indicates if fast vector highlighting should be used.
-
Constructor Details
-
CmsSearchConfigurationHighlighting
public CmsSearchConfigurationHighlighting(String field, Integer snippetCount, Integer fragSize, String alternateField, Integer maxAlternateFieldLength, String pre, String post, String formatter, String fragmenter, 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 Details
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-
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:
-