Class MatchingFields

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

    public class MatchingFields
    extends FieldExpression
    FieldExpression to provide the list of fields that matched during query execution.

    This is useful if performing an OR query across multiple fields, as this field expression will indicate what fields provided the match for the OR for each respective matching document.

    PERFORMANCE NOTE: this field expression can be quite costly. It will cause the query execution to be upwards of 2x slower than normal query execution without requesting matching fields.

    See Also:
    Serialized Form
    • Constructor Detail

      • MatchingFields

        public MatchingFields()
        Construct a new MatchingFields.
    • Method Detail

      • getLabel

        public java.lang.String getLabel()
        Get the name of the query parameter that will be used to label matching subqueries.

        If null, matching subqueries will be collected and labeled by field name.

      • setLabel

        public void setLabel​(java.lang.String value)
        Get the name of the query parameter that will be used to label matching subqueries.

        If null, matching subqueries will be collected and labeled by field name.

      • 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
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object