Database db = Factory.getSession().getCurrentDatabase();
View view = db.getView("people");
//Returns the total number of entries e.g. 100
System.out.println( view.getEntryCount() );
//Filters the view so it represents only those documents that match the query
view.FTSearch("[lasteName] = \"Lynn\"");
//Returns the correct filtered number e.g. 30
System.out.println( view.getEntryCount() );
//Create a ViewNavigator based on the filtered view.
ViewNavigator nav = view.createViewNav();
//Unfortunately, it returns the original 100 instead of 30
System.out.println( nav.getCount() );
The example above illustrates that, when creating a ViewNavigator instance on a filtered (FTSearched) view, the original view data is used and not the filtered view one. Can anyone explain why this happens? Or clarify some (basic) underlying mechanism?