Scenario: There are 45 documents in Lucene (could be modules / pages / docs). They all have the same word, e.g. George. However, the user has view permission on only 5, and suppose these are found on second page (based on ranking) if search is performed as Host.
Regardless if user has permission to see the content or not, we always include 'about xx records' as the total hit. For e.g. if Host does the search, he/she will find 45 hits and total count shown in UI will be 45. However, when a typical user does the same search, it will find only 5 hits (based on security) but indicate about 45 records found. I think this is misleading.
With security trimming we'll never be accurate as accuracy will result in perf degradation, but we should try to little bit more closer to reality.
Given the current collector model for security triming we should be able to exclude the number of records rejected from the total.
We should have unit tests to support the above.
Note for QA - It's not that easy to write very technical requirement, please come talk to Dev or Ash for more details on this issue.