/// <summary> /// Combines a Term searching the <paramref name="field"/> field for the <paramref name="value"/> string, /// using a logical AND, with another Term generated by the <paramref name="groupSetup"/> Func. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="value">The other value to match.</param> /// <param name="groupSetup"> /// A <see cref="Func{T1,T2}"/> that accepts a <see cref="Term"/> for fluent configuration, /// and returns a configured <see cref="Term"/>. /// </param> /// <returns> /// A new <see cref="BinaryTerm"/> based on the two created <see cref="Term"/>s. /// </returns> public BinaryTerm And(string field, string value, Func <Term, Term> groupSetup) { return(And(field, Token.Is(value), groupSetup)); }
/// <summary> /// Combines this Term, using a logical OR, with a new one /// searching this Term's field for the provided <paramref name="value"/> string. /// </summary> /// <param name="value">The other value to match.</param> /// <returns> /// A new <see cref="BinaryTerm"/> based on this Term and the provided <paramref name="value"/>. /// </returns> public BinaryTerm Or(string value) { return(Or(field, Token.Is(value))); }
/// <summary> /// Combine this Term, using a logical AND, with a new Range Term /// searching <paramref name="field"/> for values between <paramref name="from"/> /// and <paramref name="to"/>. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="from">The lower bound of values to search for.</param> /// <param name="to">The upper bound of values to search for.</param> /// <param name="inclusive">The option to include the bounds in the range or not.</param> /// <returns> /// A new <see cref="BinaryTerm"/> based on this Term and the provided parameters. /// </returns> public BinaryTerm AndBetween(string field, string from, Token to, bool inclusive = true) { return(AndBetween(field, Token.Is(from), to, inclusive)); }
/// <summary> /// Combine this Term, using a logical AND, with a new Range Term /// searching <paramref name="field"/> for values between <paramref name="from"/> /// and <paramref name="to"/>. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="from">The lower bound of values to search for.</param> /// <param name="to">The upper bound of values to search for.</param> /// <param name="inclusive">The option to include the bounds in the range or not.</param> /// <returns> /// A new <see cref="BinaryTerm"/> based on this Term and the provided parameters. /// </returns> public BinaryTerm AndBetween(string field, Token from, string to, bool inclusive = true) { return(AndBetween(field, from, Token.Is(to), inclusive)); }
/// <summary> /// Combine this Term, using a logical OR, with a new Range Term /// searching <paramref name="field"/> for values between <paramref name="from"/> /// and <paramref name="to"/>. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="from">The lower bound of values to search for.</param> /// <param name="to">The upper bound of values to search for.</param> /// <param name="inclusive">The option to include the bounds in the range or not.</param> /// <returns> /// A new <see cref="BinaryTerm"/> based on this Term and the provided parameters. /// </returns> public BinaryTerm OrBetween(string field, string from, string to, bool inclusive = true) { return(OrBetween(field, Token.Is(from), Token.Is(to), inclusive)); }
/// <summary> /// Combines this Term, using a logical AND, with a new one searching the /// <paramref name="field"/> field for the provided <paramref name="value"/> string. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="value">The other value to match.</param> /// <returns> /// A new <see cref="BinaryTerm"/> based on this Term and the provided <paramref name="value"/>. /// </returns> public BinaryTerm And(string field, string value) { return(And(field, Token.Is(value))); }
/// <summary> /// Combines this Term, using a logical OR, with a new one searching the <paramref name="field"/> /// field for <paramref name="value"/> string. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="value">The other value to match.</param> /// <returns> /// A new <see cref="BinaryTerm"/> based on this Term and the provided <paramref name="value"/>. /// </returns> public BinaryTerm Or(string field, string value) { return(new BinaryTerm(search, field, BinaryTerm.Op.Or, this, Token.Is(value))); }
/// <summary> /// Search the current field for an exact match to the <paramref name="value"/> string. /// </summary> /// <param name="value">The value to search for.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public Term Search(string value) { return(Search(Token.Is(value))); }
/// <summary> /// Search the current field for values between <paramref name="from"/> and <paramref name="to"/>. /// </summary> /// <param name="from">The lower bound of values to search for.</param> /// <param name="to">The upper bound of values to search for.</param> /// <param name="inclusive">The option to include the bounds in the range or not.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public Term Between(string from, Token to, bool inclusive = true) { return(Between(Token.Is(from), to, inclusive)); }
/// <summary> /// Search the current field for values between <paramref name="from"/> and <paramref name="to"/>. /// </summary> /// <param name="from">The lower bound of values to search for.</param> /// <param name="to">The upper bound of values to search for.</param> /// <param name="inclusive">The option to include the bounds in the range or not.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public Term Between(Token from, string to, bool inclusive = true) { return(Between(from, Token.Is(to), inclusive)); }
/// <summary> /// Search the current field for <paramref name="value"/>, /// and group that query with another provided by <paramref name="groupSetup"/>. /// </summary> /// <param name="value">The field to search values for.</param> /// <param name="groupSetup"> /// An <see cref="Func{T1,T2}"/> that accepts a <see cref="Term"/> for fluent configuration, /// and returns that configured <see cref="Term"/>. /// </param> /// <returns>A constructed search <see cref="Term"/>.</returns> /// <remarks> /// Configure the phase with a lambda similar to: /// <code>new RiakFluentSearch("bucket", "key").Group("foo", t => t.Or("bar"));</code> /// The above filter will return the following grouped query string: /// <code>key:(key:foo OR key:bar)</code>. /// </remarks> public Term Group(string value, Func <Term, Term> groupSetup) { return(Group(Token.Is(value), groupSetup)); }