/// <summary>Adds a clause to a boolean query.</summary> /// <throws> TooManyClauses if the new number of clauses exceeds the maximum clause number </throws> /// <seealso cref="GetMaxClauseCount()"> /// </seealso> public virtual void Add(BooleanClause clause) { if (clauses.Count >= maxClauseCount) throw new TooManyClauses(); clauses.Add(clause); }
/// <summary>Adds a clause to a boolean query. /// /// </summary> /// <throws> TooManyClauses if the new number of clauses exceeds the maximum clause number </throws> /// <seealso cref="GetMaxClauseCount()"> /// </seealso> public virtual void Add(Query query, BooleanClause.Occur occur) { Add(new BooleanClause(query, occur)); }