Class PhraseMatch

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public final class PhraseMatch
    extends FieldExpression
    FieldExpression that returns a boolean result indicating if a phrase matches a document.
    See Also:
    Serialized Form
    • Constructor Detail

      • PhraseMatch

        public PhraseMatch​(java.lang.String field,
                           Phrase phrase)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object other)
      • hashCode

        public int hashCode()
      • getFieldName

        public java.lang.String getFieldName()
        Get the field to match against.
        Overrides:
        getFieldName in class FieldExpression
      • setFieldName

        public void setFieldName​(java.lang.String value)
        Set the field to match against.
      • getPhrase

        public Phrase getPhrase()
        Get the phrase to use for matching.
      • setPhrase

        public void setPhrase​(Phrase value)
        Set the phrase to use for matching.
      • hasChildren

        public boolean hasChildren()
        Returns true if this field expression has any sub FieldExpressions.
        Specified by:
        hasChildren in class FieldExpression
      • isConstant

        public boolean isConstant()
        Returns true if this field expression evaluates to a constant value.
        Specified by:
        isConstant in class FieldExpression
      • rewrite

        public void rewrite​(QueryHandler handler,
                            boolean recursive)
        Rewrite any query objects in this FieldExpression using handler.
        Overrides:
        rewrite in class FieldExpression
      • appendParameters

        protected void appendParameters​(java.lang.StringBuilder buffer)