예제 #1
0
        public ContextualQueryBuilder Match(Action <MatchQueryBuilder> queryDefinition)
        {
            var queryBuilder = new MatchQueryBuilder();

            queryDefinition(queryBuilder);
            _query = queryBuilder.Build();
            return(this);
        }
예제 #2
0
        public MatchQueryBuilder Maybe(Action <MatchQueryBuilder> queryDefinition)
        {
            var queryBuilder = new MatchQueryBuilder();

            queryDefinition(queryBuilder);
            var query = queryBuilder.Build();

            SetQuery(new MaybeQuery(query));
            return(this);
        }
예제 #3
0
        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);
        }