Exemplo n.º 1
0
 /// <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);
 }
Exemplo n.º 2
0
 public ProximityType(ProximityQueryNode.Type type, int distance)
 {
     this.pType = type;
     this.pDistance = distance;
 }
Exemplo n.º 3
0
 public ProximityType(ProximityQueryNode.Type type, int distance)
 {
     this.pType     = type;
     this.pDistance = distance;
 }
Exemplo n.º 4
0
 /// <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)
 {
 }
Exemplo n.º 5
0
 public ProximityType(ProximityQueryNode.Type type)
     : this(type, 0)
 {
 }