public OdooQuery <T> Select(params string[] fields) { foreach (var f in fields) { ReturnFields.Add(f); } return(this); }
public SearchDescriptor <T> GetSearchDescriptor() { var s = new SearchDescriptor <T>() .Index(Indices) .Skip(Skip ?? 0) .Take(Take ?? 10) .Aggregations(a => BucketFields.GetBucketAggreagationDescriptor <T>()) .Query(q => FilterFields.GetQueryDesctiptor <T>()) .Source(t => ReturnFields.GetSourceFilterDescriptor <T>()) .Sort(s => SortFields.GetSortDescriptor <T>()); return(s); }
public string[] GetRequestFields() { return(ReturnFields.Any() ? ReturnFields.ToArray() : null); }