/// <summary> /// Search the current field for a set of <paramref name="words"/> that /// are within a certain distance (<paramref name="proximity"/>) of each other. /// </summary> /// <param name="field">The field to search.</param> /// <param name="proximity">The maximum distance the words can be from each other.</param> /// <param name="words">The set of words to find within a certain distance of each other.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public ProximityTerm Proximity(string field, int proximity, params string[] words) { var term = new ProximityTerm(this, field, proximity, words); this.term = term; return(term); }
/// <summary> /// Combine this Term, using a logical OR, with a new one that searches the <paramref name="field"/> /// field for a set of <paramref name="words"/> that are within a certain distance /// (<paramref name="proximity"/>) of each other. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="proximity">The maximum distance the words can be from each other.</param> /// <param name="words">The set of words to find within a certain distance of each other.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public Term OrProximity(string field, double proximity, params string[] words) { var term = new ProximityTerm(search, field, proximity, words); return(new BinaryTerm(search, field, BinaryTerm.Op.Or, this, term)); }
/// <summary> /// Search the current field for a set of <paramref name="words"/> that /// are within a certain distance (<paramref name="proximity"/>) of each other. /// </summary> /// <param name="field">The field to search.</param> /// <param name="proximity">The maximum distance the words can be from each other.</param> /// <param name="words">The set of words to find within a certain distance of each other.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public ProximityTerm Proximity(string field, int proximity, params string[] words) { var term = new ProximityTerm(this, field, proximity, words); this.term = term; return term; }
/// <summary> /// Combine this Term, using a logical OR, with a new one that searches the <paramref name="field"/> /// field for a set of <paramref name="words"/> that are within a certain distance /// (<paramref name="proximity"/>) of each other. /// </summary> /// <param name="field">The other field to search.</param> /// <param name="proximity">The maximum distance the words can be from each other.</param> /// <param name="words">The set of words to find within a certain distance of each other.</param> /// <returns>A constructed search <see cref="Term"/>.</returns> public Term OrProximity(string field, double proximity, params string[] words) { var term = new ProximityTerm(search, field, proximity, words); return new BinaryTerm(search, field, BinaryTerm.Op.Or, this, term); }