Class HighlightConfig


  • @StableMinor(version="16.1",
                 sinceVersion="8.1")
    public class HighlightConfig
    extends java.lang.Object
    A search highlight configuration.
    Since:
    8.1.0
    Version:
    $Revision: 26156 $ $Date: 2024-01-13 10:26:46 -0300 (Sat, 13 Jan 2024) $
    • Constructor Detail

      • HighlightConfig

        public HighlightConfig()
    • Method Detail

      • addHighlightFields

        public HighlightConfig addHighlightFields​(java.lang.String... highlightFieldIds)
        Adds the given field identifiers as highlighted fields.
        Parameters:
        highlightFieldIds - the field identifiers.
        Returns:
        this highlight configuration.
        Since:
        8.1.0
      • addHighlightFields

        public HighlightConfig addHighlightFields​(java.util.Collection<java.lang.String> highlightFieldIds)
        Adds the given field identifiers as highlighted fields.
        Parameters:
        highlightFieldIds - the field identifiers.
        Returns:
        this highlight configuration.
        Since:
        8.1.0
      • getHighlightFieldIds

        public java.util.List<java.lang.String> getHighlightFieldIds()
        Returns the highlight fields identifiers.
        Returns:
        the highlight fields identifiers.
        Since:
        8.1.0
      • setEndHighlightTag

        public HighlightConfig setEndHighlightTag​(java.lang.String endHighlightTag)
        Sets the end highlight custom tag.
        Parameters:
        endHighlightTag - the end highlight custom tag.
        Returns:
        this highlight configuration.
        Since:
        8.1.0
      • setStartHighlightTag

        public HighlightConfig setStartHighlightTag​(java.lang.String startHighlightTag)
        Sets the start highlight custom tag.
        Parameters:
        startHighlightTag - the start highlight custom tag.
        Returns:
        this highlight configuration.
        Since:
        8.1.0
      • getStartHighlightTag

        public java.lang.String getStartHighlightTag()
        Returns the custom start highlight tag.
        Returns:
        the custom start highlight tag.
        Since:
        8.1.0
      • getEndHighlightTag

        public java.lang.String getEndHighlightTag()
        Returns the custom end highlight tag.
        Returns:
        the custom end highlight tag.
        Since:
        8.1.0
      • setFragmentSize

        public HighlightConfig setFragmentSize​(java.lang.Integer fragmentSize)
        Sets the highlight fragment size.
        Parameters:
        fragmentSize - the highlight fragment size.
        Returns:
        this highlight configuration.
        Since:
        8.1.0
      • getFragmentSize

        public java.lang.Integer getFragmentSize()
        Returns the highlight fragment size.
        Returns:
        the highlight fragment size.
        Since:
        8.1.0
      • setNumberOfFragments

        public HighlightConfig setNumberOfFragments​(java.lang.Integer numberOfFragments)
        Sets the maximum number of fragments returned by the search.
        Parameters:
        numberOfFragments - the maximum number of fragments returned by the search.
        Returns:
        this highlight configuration.
        Since:
        8.1.0
      • getNumberOfFragments

        public java.lang.Integer getNumberOfFragments()
        Returns the maximum number of fragments returned by the search.
        Returns:
        the maximum number of fragments returned by the search.
        Since:
        8.1.0