public string Visit_WithValidTermQuery_ReturnsValidReponse() { var query = new Lucene.Net.Search.TermQuery(new Lucene.Net.Index.Term("City", "TelAviv")); var phraseQuery = new LuceneTermQuery { LuceneQuery = query, }; var luceneVisitor = new LuceneVisitor(); phraseQuery.Accept(luceneVisitor); var es = phraseQuery.ESQuery; Assert.NotNull(es); var visitor = new ElasticSearchDSLVisitor(SchemaRetrieverMock.CreateMockSchemaRetriever()); visitor.Visit((QueryStringClause)es); return(((QueryStringClause)es).KustoQL); }
public string Visit_WithValidTermQuery_ReturnsValidReponse() { var query = new Lucene.Net.Search.TermQuery(new Lucene.Net.Index.Term("City", "TelAviv")); var phraseQuery = new LuceneTermQuery { LuceneQuery = query, }; var luceneVisitor = new LuceneVisitor(); phraseQuery.Accept(luceneVisitor); var es = phraseQuery.ESQuery; Assert.NotNull(es); var visitor = VisitorTestsUtils.CreateAndVisitRootVisitor(); visitor.Visit((QueryStringClause)es); return(((QueryStringClause)es).KustoQL); }