public void TestPrefixQuery() { var prefixQuery = new PrefixQuery("name", "张"); var termFilter = new TermFilter("type", "common"); var q = new FilteredQuery(prefixQuery,termFilter); var result = client.Search(index, "type" , q, 0, 5); Assert.AreEqual(3, result.GetTotalCount()); prefixQuery = new PrefixQuery("name", "张三"); termFilter = new TermFilter("type", "common"); q = new FilteredQuery(prefixQuery, termFilter); result = client.Search(index, "type" , q, 0, 5); Assert.AreEqual(2, result.GetTotalCount()); }