Tests.QueryDSLTests.TestConstantQueryWithQueryFilter C# (CSharp) Method

TestConstantQueryWithQueryFilter() private method

private TestConstantQueryWithQueryFilter ( ) : void
return void
        public void TestConstantQueryWithQueryFilter()
        {
            var termQuery = new TermQuery("gender", "true");
            var queryFilter = new QueryFilter(termQuery);
            var constanFilter = new ConstantScoreQuery(queryFilter);
            var result2 = client.Search(index, "type" , constanFilter, 0, 5);
            Assert.AreEqual(50, result2.GetTotalCount());
            Assert.AreEqual(5, result2.GetHits().Hits.Count);
        }