Class Teaser

    • Constructor Detail

      • Teaser

        public Teaser​(java.lang.String fieldName)
    • Method Detail

      • isConstant

        public boolean isConstant()
        Returns true if this field expression evaluates to a constant value.
        Overrides:
        isConstant in class UnaryFieldExpression
      • getQuery

        public Query getQuery()
        Get the query to use for highlighting.

        If null, the QueryRequest's highlight query will be used.

      • getQuery

        public Query getQuery​(Query defaultQuery)
        Get the query to use for highlighting.

        Returns defaultQuery if highlighting query is not set.

      • setQuery

        public void setQuery​(Query value)
        Set the query to use for highlighting

        If null, the QueryRequest's highlight query will be used.

      • setTokenizer

        public void setTokenizer​(java.lang.String tokenizer)
        Set the tokenizer to use for highlighting.
      • getTokenizer

        public java.lang.String getTokenizer()
        Get the name of the tokenizer to use for highlighting.
      • getHighlightScope

        public java.lang.String getHighlightScope()
        Get the scope name to annotate phrase matches with.
      • setHighlightScope

        public void setHighlightScope​(java.lang.String value)
        Set the scope name to annotate phrase matches with.
      • getMatchScope

        public java.lang.String getMatchScope()
        Get the scope name to annotate atomic matches with.
      • setMatchScope

        public void setMatchScope​(java.lang.String value)
        Set the scope name to annotate atomic matches with.
      • getHighlightMode

        public HighlightMode getHighlightMode()
        Get the mode for annotating scopes.
      • setHighlightMode

        public void setHighlightMode​(HighlightMode value)
        Set the mode for annotating scopes.
      • setFallbackField

        public void setFallbackField​(java.lang.String field)
        Set the fallback field (to use if highlighting yields no text).
      • getFallbackField

        public java.lang.String getFallbackField()
        Get the fallback field.
      • setFragment

        public void setFragment​(java.lang.Boolean value)
        Set if the teaser should be fragmented.
      • isFragment

        public java.lang.Boolean isFragment()
        Get if the teaser should be fragmented.
      • setMergeFragments

        public void setMergeFragments​(java.lang.Boolean value)
        Set if fragments should be merged.
      • isMergeFragments

        public java.lang.Boolean isMergeFragments()
        Get if fragments should be merged.
      • setNumFragments

        public void setNumFragments​(java.lang.Integer value)
        Set the number of framents to generate (if fragmenting).
      • getNumFragments

        public java.lang.Integer getNumFragments()
        Get the number of framents to generate (if fragmenting).
      • setFragmentSize

        public void setFragmentSize​(java.lang.Integer value)
        Set the size of generated fragments.
      • getFragmentSize

        public java.lang.Integer getFragmentSize()
        Get the size of generated fragments.
      • getFragmentScope

        public java.lang.String getFragmentScope()
        Get the name of the scope to use for fragmenting.
      • setFragmentScope

        public void setFragmentScope​(java.lang.String value)
        Set the name of the scope to use for fragmenting.
      • setSeparator

        public void setSeparator​(java.lang.String value)
        Set the markup to insert between generated fragments.
      • getSeparator

        public java.lang.String getSeparator()
        Get the markup to insert between generated fragments.
      • getWhitelist

        public java.lang.String[] getWhitelist()
        Get the fields to extract query terms from.
      • setWhitelist

        public void setWhitelist​(java.lang.String... whitelist)
        Set the fields to extract query terms from.
      • setWhitelist

        public void setWhitelist​(java.util.Collection<java.lang.String> whitelist)
        Set the fields to extract query terms from.
      • setParameters

        protected void setParameters​(StringParser reader)