public ElasticQueryParserConfiguration AddVisitor(IChainableQueryVisitor visitor, int priority = 0)
        {
            QueryVisitor.AddVisitor(visitor, priority);
            AggregationVisitor.AddVisitor(visitor, priority);
            SortVisitor.AddVisitor(visitor, priority);

            return(this);
        }
        public ElasticQueryParserConfiguration UseAliases(AliasResolver defaultAliasResolver, int priority = 50)
        {
            DefaultAliasResolver = defaultAliasResolver;

            var visitor = new AliasedQueryVisitor();

            QueryVisitor.AddVisitor(visitor, priority);
            SortVisitor.AddVisitor(visitor, priority);

            AggregationVisitor.AddVisitor(new AliasedQueryVisitor(false), priority);
            return(this);
        }