SearchResult’s shows TotalResults 1000 but list size is 10.
public static List<Document> queryonId(UnifiedJedis client) {
Query q = new Query().addFilter(new Query.NumericFilter("id", 0, 10000)).setSortBy("id", true);
SearchResult result = client.ftSearch("student-index-test", q);
System.out.println("TotalResults :"+result.getTotalResults());
System.out.println("List size: "+result.getDocuments().size());
return result.getDocuments();
}
Output of above code
TotalResults :10000
List size: 10
Please let me know what is going wrong here.