/// <summary> /// Start a fluent aggregation pipeline with a $text stage with the supplied parameters /// <para>TIP: Make sure to define a text index with DB.Index<T>() before searching</para> /// </summary> /// <param name="searchType">The type of text matching to do</param> /// <param name="searchTerm">The search term</param> /// <param name="caseSensitive">Case sensitivity of the search (optional)</param> /// <param name="diacriticSensitive">Diacritic sensitivity of the search (optional)</param> /// <param name="language">The language for the search (optional)</param> /// <param name="options">Options for finding documents (not required)</param> /// <param name="ignoreGlobalFilters">Set to true if you'd like to ignore any global filters for this operation</param> public IAggregateFluent <T> FluentTextSearch <T>(Search searchType, string searchTerm, bool caseSensitive = false, bool diacriticSensitive = false, string language = null, AggregateOptions options = null, bool ignoreGlobalFilters = false) where T : IEntity { var globalFilter = Logic.MergeWithGlobalFilter(ignoreGlobalFilters, globalFilters, Builders <T> .Filter.Empty); if (globalFilter != Builders <T> .Filter.Empty) { return(DB .FluentTextSearch <T>(searchType, searchTerm, caseSensitive, diacriticSensitive, language, options, Session) .Match(globalFilter)); } return(DB.FluentTextSearch <T>(searchType, searchTerm, caseSensitive, diacriticSensitive, language, options, Session)); }
/// <summary> /// Start a fluent aggregation pipeline with a $text stage with the supplied parameters /// <para>TIP: Make sure to define a text index with DB.Index<T>() before searching</para> /// </summary> /// <param name="searchType">The type of text matching to do</param> /// <param name="searchTerm">The search term</param> /// <param name="caseSensitive">Case sensitivity of the search (optional)</param> /// <param name="diacriticSensitive">Diacritic sensitivity of the search (optional)</param> /// <param name="language">The language for the search (optional)</param> /// <param name="options">Options for finding documents (not required)</param> public virtual IAggregateFluent <T> FluentTextSearch <T>(Search searchType, string searchTerm, bool caseSensitive = false, bool diacriticSensitive = false, string language = null, AggregateOptions options = null) where T : IEntity { return(DB.FluentTextSearch <T>(searchType, searchTerm, caseSensitive, diacriticSensitive, language, options, session)); }
public IAggregateFluent<T> FluentTextSearch<T>(Search searchType, string searchTerm, bool caseSensitive = false, bool diacriticSensitive = false, string language = null, AggregateOptions options = null) { return DB.FluentTextSearch<T>(searchType, searchTerm, caseSensitive, diacriticSensitive, language, options, Session, db); }