/// <summary> /// /// </summary> /// <param name="clauses">QueryNode children</param> /// <param name="field">field name</param> /// <param name="type">type of proximity query</param> /// <param name="distance">positive integer that specifies the distance</param> /// <param name="inorder">true, if the tokens should be matched in the order of the clauses</param> public ProximityQueryNode(IList<IQueryNode> clauses, string field, ProximityQueryNode.Type type, int distance, bool inorder) : base(clauses) { IsLeaf = false; this.proximityType = type; this.inorder = inorder; this.field = field; if (type == ProximityQueryNode.Type.NUMBER) { if (distance <= 0) { throw new QueryNodeError(new MessageImpl( QueryParserMessages.PARAMETER_VALUE_NOT_SUPPORTED, "distance", distance)); } else { this.distance = distance; } } ClearFields(clauses, field); }
public ProximityType(ProximityQueryNode.Type type, int distance) { this.pType = type; this.pDistance = distance; }
public ProximityType(ProximityQueryNode.Type type, int distance) { this.pType = type; this.pDistance = distance; }
/// <summary> /// /// </summary> /// <param name="clauses">QueryNode children</param> /// <param name="field">field name</param> /// <param name="type">type of proximity query</param> /// <param name="inorder">true, if the tokens should be matched in the order of the clauses</param> public ProximityQueryNode(IList <IQueryNode> clauses, string field, ProximityQueryNode.Type type, bool inorder) : this(clauses, field, type, -1, inorder) { }
public ProximityType(ProximityQueryNode.Type type) : this(type, 0) { }