예제 #1
0
        public string Visit_WithValidRangeQuery_ReturnsValidResponse()
        {
            var rangeQuery = new LuceneRangeQuery
            {
                LuceneQuery =
                    new Lucene.Net.Search.TermRangeQuery(
                        "days",
                        "2",
                        "6",
                        true,
                        true),
            };

            var luceneVisitor = new LuceneVisitor();

            rangeQuery.Accept(luceneVisitor);

            var es = rangeQuery.ESQuery;

            Assert.NotNull(es);

            var visitor = VisitorTestsUtils.CreateAndVisitRootVisitor("days", "long");

            visitor.Visit((RangeClause)es);

            return(((RangeClause)es).KustoQL);
        }
예제 #2
0
        public string Visit_WithValidRangeQuery_ReturnsValidResponse()
        {
            var rangeQuery = new LuceneRangeQuery
            {
                LuceneQuery =
                    new Lucene.Net.Search.TermRangeQuery(
                        "days",
                        "2",
                        "6",
                        true,
                        true),
            };

            var luceneVisitor = new LuceneVisitor();

            rangeQuery.Accept(luceneVisitor);

            var es = rangeQuery.ESQuery;

            Assert.NotNull(es);

            var visitor = new ElasticSearchDSLVisitor(SchemaRetrieverMock.CreateMockSchemaRetriever());

            visitor.Visit((RangeClause)es);

            return(((RangeClause)es).KustoQL);
        }