lucene
lucene copied to clipboard
Fix test bug in TestTopDocsCollector and TestTopFieldCollector
Fix the following bugs in TestTopDocsCollector and TestTopFieldCollector:
- If
leafCollector.collect(4), the documents count in this segment should be greater than 4. - For a new leafCollector, the collected doc id should starts from 0 and then 1, and same doc id shouldn't be collected again.
The test result won't be changed, but this PR makes the test cases more clear.