/// <summary> /// Filters documents that have fields that match any of the provided terms (not analyzed). /// </summary> public FilterContainer Terms(string field, IEnumerable <string> terms, TermsExecution?Execution = null) { ITermsFilter filter = new TermsFilterDescriptor(); filter.Field = field; filter.Terms = terms ?? Enumerable.Empty <string>(); return(this.New(filter, f => f.Terms = filter)); }
public void Terms(string field, IEnumerable <string> terms, TermsExecution?Execution = null) { this.SetDictionary(field, terms, (d) => { if (Execution.HasValue) { d.Add("execution", Enum.GetName(typeof(TermsExecution), Execution)); } this.TermsFilter = d; }); }
/// <summary> /// Filters documents that have fields that match any of the provided terms (not analyzed). /// </summary> public BaseFilter Terms(string field, IEnumerable <string> terms, TermsExecution?Execution = null) { return(this.SetDictionary("terms", field, terms, (d, b) => { if (Execution.HasValue) { d.Add("execution", Enum.GetName(typeof(TermsExecution), Execution)); } b.TermsFilter = d; })); }
public static BaseFilter Terms(string field, IEnumerable <string> terms, TermsExecution?Execution = null) { return(new FilterDescriptor <T>().Terms(field, terms, Execution)); }
public static BaseFilter Terms(Expression <Func <T, object> > fieldDescriptor, IEnumerable <string> terms, TermsExecution?Execution = null) { return(new FilterDescriptor <T>().Terms(fieldDescriptor, terms, Execution)); }
/// <summary> /// Filters documents that have fields that match any of the provided terms (not analyzed). /// </summary> public FilterContainer Terms(Expression <Func <T, object> > fieldDescriptor, IEnumerable <string> terms, TermsExecution?Execution = null) { ITermsFilter filter = new TermsFilterDescriptor(); filter.Field = fieldDescriptor; filter.Terms = terms; filter.Execution = Execution; return(this.New(filter, f => f.Terms = filter)); }
/// <summary> /// Filters documents that have fields that match any of the provided terms (not analyzed). /// </summary> public FilterContainer Terms <K>(Expression <Func <T, IEnumerable <K> > > fieldDescriptor, IEnumerable <K> terms, TermsExecution?Execution = null) { ITermsFilter filter = new TermsFilterDescriptor(); filter.Field = fieldDescriptor; filter.Terms = (terms != null) ? terms.Cast <object>() : null; filter.Execution = Execution; return(this.New(filter, f => f.Terms = filter)); }
/// <summary> /// Filters documents that have fields that match any of the provided terms (not analyzed). /// </summary> public BaseFilter Terms(Expression <Func <T, object> > fieldDescriptor, IEnumerable <string> terms, TermsExecution?Execution = null) { return(this.SetDictionary("terms", fieldDescriptor, terms, (d, b) => { if (Execution.HasValue) { d.Add("execution", Enum.GetName(typeof(TermsExecution), Execution)); } b.TermsFilter = d; })); }
public void Terms(Expression <Func <T, object> > fieldDescriptor, IEnumerable <string> terms, TermsExecution?Execution = null) { var field = ElasticClient.PropertyNameResolver.Resolve(fieldDescriptor); this.Terms(field, terms, Execution); }
/// <summary> /// Filters documents that have fields that match any of the provided terms (not analyzed). /// </summary> public BaseFilter Terms(Expression <Func <T, object> > fieldDescriptor, IEnumerable <string> terms, TermsExecution?Execution = null) { var field = new PropertyNameResolver().Resolve(fieldDescriptor); return(this.Terms(field, terms, Execution)); }