private static QueryContainer CreateMustContainer(IList<QueryContainer> mustClauses, IEnumerable<QueryContainer> mustNotClauses, IEnumerable<QueryContainer> filters) => new BoolQuery { Must = mustClauses.ToListOrNullIfEmpty(), MustNot = mustNotClauses.ToListOrNullIfEmpty(), Filter = filters.ToListOrNullIfEmpty() };
private static QueryContainer CreateShouldContainer(IList<QueryContainer> shouldClauses) => new BoolQuery { Should = shouldClauses.ToListOrNullIfEmpty() };