Class ProximityQueryNode

  • All Implemented Interfaces:
    Cloneable, QueryNode

    public class ProximityQueryNode
    extends BooleanQueryNode
    A ProximityQueryNode represents a query where the terms should meet specific distance conditions. (a b c) WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] ("a" "b" "c") WITHIN [SENTENCE|PARAGRAPH|NUMBER] [INORDER] TODO: Add this to the future standard Lucene parser/processor/builder
    • Constructor Detail

      • ProximityQueryNode

        public ProximityQueryNode​(List<QueryNode> clauses,
                                  CharSequence field,
                                  ProximityQueryNode.Type type,
                                  int distance,
                                  boolean inorder)
        Parameters:
        clauses - - QueryNode children
        field - - field name
        type - - type of proximity query
        distance - - positive integer that specifies the distance
        inorder - - true, if the tokens should be matched in the order of the clauses
      • ProximityQueryNode

        public ProximityQueryNode​(List<QueryNode> clauses,
                                  CharSequence field,
                                  ProximityQueryNode.Type type,
                                  boolean inorder)
        Parameters:
        clauses - - QueryNode children
        field - - field name
        type - - type of proximity query
        inorder - - true, if the tokens should be matched in the order of the clauses