Esempio n. 1
0
        /// <summary>
        ///  The regexp filter allows you to use regular expression term queries.
        /// </summary>
        /// <param name="selector"></param>
        public FilterContainer Regexp(Action <RegexpFilterDescriptor <T> > selector)
        {
            var filter = new RegexpFilterDescriptor <T>();

            if (selector != null)
            {
                selector(filter);
            }

            return(this.New(filter, f => f.Regexp = filter));
        }
Esempio n. 2
0
        /// <summary>
        ///  The regexp filter allows you to use regular expression term queries.
        /// </summary>
        /// <param name="selector"></param>
        public BaseFilter Regexp(Action <RegexpFilterDescriptor <T> > selector)
        {
            var filter = new RegexpFilterDescriptor <T>();

            if (selector != null)
            {
                selector(filter);
            }

            return(this.SetDictionary("regexp", filter._Field, filter, (d, b) =>
            {
                b.RegexpFilter = d;
            }));
        }