/// <summary>
        /// More like this query find documents that are “like” provided text by running it against one or more fields.
        /// </summary>
        public QueryContainer MoreLikeThis(Action <MoreLikeThisQueryDescriptor <T> > selector)
        {
            var query = new MoreLikeThisQueryDescriptor <T>();

            selector(query);

            return(this.New(query, q => q.MoreLikeThis = query));
        }
Example #2
0
        /// <summary>
        /// Specify on which fields the _mlt should act and how it should behave
        /// </summary>
        public MoreLikeThisDescriptor <T> Options(Func <MoreLikeThisQueryDescriptor <T>, MoreLikeThisQueryDescriptor <T> > optionsSelector)
        {
            optionsSelector.ThrowIfNull("optionsSelector");
            var d = optionsSelector(new MoreLikeThisQueryDescriptor <T>());

            this._Options = d;
            return(this);
        }