コード例 #1
0
        /// <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;
        }