Class OptionalNode

  • All Implemented Interfaces:
    Node

    public class OptionalNode
    extends IntersectNode
    Created by mnunberg on 2/23/18. The optional node affects scoring and ordering. If it evaluates to true, the result is ranked higher. It is helpful to combine it with a UnionNode to rank a document higher if it meets one of several criteria. In RS: ~(@lang:en @country:us).
    • Constructor Detail

      • OptionalNode

        public OptionalNode()
    • Method Detail

      • toString

        public java.lang.String toString​(Node.ParenMode mode)
        Description copied from interface: Node
        Returns the string form of this node.
        Specified by:
        toString in interface Node
        Overrides:
        toString in class QueryNode
        Parameters:
        mode - Whether the string should be encapsulated in parentheses (...)
        Returns:
        The string query.