/// <summary>
        /// A query that matches documents matching boolean combinations of other queries. The bool query maps to
        /// Lucene BooleanQuery.
        /// It is built using one or more boolean clauses, each clause with a typed occurrence
        /// </summary>
        public QueryContainer Bool(Action <BoolQueryDescriptor <T> > booleanQuery)
        {
            var query = new BoolQueryDescriptor <T>();

            booleanQuery(query);
            return(this.New(query, q => q.Bool = query));
        }
예제 #2
0
        public void Bool(Action <BoolQueryDescriptor <T> > booleanQuery)
        {
            var query = new BoolQueryDescriptor <T>();

            booleanQuery(query);
            this.BoolQueryDescriptor = query;
        }