Ejemplo n.º 1
0
        public void Boosting(Action <BoostingQueryDescriptor <T> > boostingQuery)
        {
            var query = new BoostingQueryDescriptor <T>();

            boostingQuery(query);
            this.BoostingQueryDescriptor = query;
        }
        /// <summary>
        /// the boosting query can be used to effectively demote results that match a given query.
        /// Unlike the “NOT” clause in bool query, this still selects documents that contain
        /// undesirable terms, but reduces their overall score.
        /// </summary>
        /// <param name="boostingQuery"></param>
        public QueryContainer Boosting(Action <BoostingQueryDescriptor <T> > boostingQuery)
        {
            var query = new BoostingQueryDescriptor <T>();

            boostingQuery(query);

            return(this.New(query, q => q.Boosting = query));
        }