private static QueryContainer CreateMustContainer(List <QueryContainer> mustClauses, QueryContainer reuse) { var existingBool = reuse?.Self().Bool; if (existingBool != null && existingBool.CreatedByBoolDsl) { existingBool.Must = mustClauses.ToListOrNullIfEmpty(); return(reuse); } return(new QueryContainer(new BoolQuery(createdByBoolDsl: true) { Must = mustClauses.ToListOrNullIfEmpty() })); }
private static QueryContainer CreateMustContainer(List <QueryContainer> mustClauses, QueryContainer reuse) { return(new QueryContainer(new BoolQuery() { Must = mustClauses.ToListOrNullIfEmpty() })); }
private static QueryContainer CreateMustContainer( List <QueryContainer> mustClauses, List <QueryContainer> mustNotClauses, List <QueryContainer> filters ) => new QueryContainer(new BoolQuery { Must = mustClauses.ToListOrNullIfEmpty(), MustNot = mustNotClauses.ToListOrNullIfEmpty(), Filter = filters.ToListOrNullIfEmpty() });
private static QueryContainer CreateMustContainer(List <QueryContainer> mustClauses) => new QueryContainer(new BoolQuery() { Must = mustClauses.ToListOrNullIfEmpty() });
private static QueryContainer CreateShouldContainer(List <QueryContainer> shouldClauses) => new BoolQuery { Should = shouldClauses.ToListOrNullIfEmpty() };
private static QueryContainer CreateShouldContainer(List<QueryContainer> shouldClauses) => //new BoolQuery(createdByBoolDsl: true) new BoolQuery() { Should = shouldClauses.ToListOrNullIfEmpty() };
private static QueryContainer CreateShouldContainer(List <QueryContainer> shouldClauses) => //new BoolQuery(createdByBoolDsl: true) new BoolQuery() { Should = shouldClauses.ToListOrNullIfEmpty() };
private static QueryContainer CreateMustContainer( List<QueryContainer> mustClauses, List<QueryContainer> mustNotClauses, List<QueryContainer> filters ) { return new QueryContainer(new BoolQuery { Must = mustClauses.ToListOrNullIfEmpty(), MustNot = mustNotClauses.ToListOrNullIfEmpty(), Filter = filters.ToListOrNullIfEmpty() }); }
private static QueryContainer CreateMustContainer(List<QueryContainer> mustClauses, QueryContainer reuse) { return new QueryContainer(new BoolQuery() { Must = mustClauses.ToListOrNullIfEmpty() }); }