public ContextualQueryBuilder Match(Action <MatchQueryBuilder> queryDefinition) { var queryBuilder = new MatchQueryBuilder(); queryDefinition(queryBuilder); _query = queryBuilder.Build(); return(this); }
public MatchQueryBuilder Maybe(Action <MatchQueryBuilder> queryDefinition) { var queryBuilder = new MatchQueryBuilder(); queryDefinition(queryBuilder); var query = queryBuilder.Build(); SetQuery(new MaybeQuery(query)); return(this); }
public MatchQueryBuilder Or(params Action <MatchQueryBuilder>[] queriesDefinitions) { var queries = queriesDefinitions.Select(qd => { var queryBuilder = new MatchQueryBuilder(); qd(queryBuilder); return(queryBuilder.Build()); }); SetQuery(new OrQuery(queries)); return(this); }