mbien commented on code in PR #766:
URL: https://github.com/apache/maven-indexer/pull/766#discussion_r3918372155
##########
indexer-core/src/main/java/org/apache/maven/index/DefaultSearchEngine.java:
##########
@@ -181,27 +187,28 @@ protected int searchFlat(
return hitCount;
}
- protected int searchGrouped(
+ protected long searchGrouped(
GroupedSearchRequest req,
Map<String, ArtifactInfoGroup> result,
Grouping grouping,
List<IndexingContext> participatingContexts,
Query query)
throws IOException {
- int hitCount = 0;
+ long hitCount = 0;
for (IndexingContext context : participatingContexts) {
final IndexSearcher indexSearcher = context.acquireIndexSearcher();
+ final StoredFields storedFields = indexSearcher.storedFields();
try {
- final TopScoreDocCollector collector =
doSearchWithCeiling(req, indexSearcher, query);
+ final TopDocs topdocs = doSearchWithCeiling(req,
indexSearcher, query);
- if (collector.getTotalHits() > 0) {
- ScoreDoc[] scoreDocs = collector.topDocs().scoreDocs;
+ if (topdocs.totalHits.value() > 0) {
+ ScoreDoc[] scoreDocs = topdocs.scoreDocs;
- hitCount += collector.getTotalHits();
+ hitCount += topdocs.totalHits.value();
Review Comment:
`totalHits` value is now a long, the maven-indexer response api is still
using int, I didn't change that. (see casts marked with TODO)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]