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 Details

    • OptionalNode

      public OptionalNode()
  • Method Details

    • toString

      public String toString(Node.Parenthesize 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.