SearchContext maintains a size
length int[]
when there are fewer than size
results
#4156
Labels
size
length int[]
when there are fewer than size
results
#4156
Reproduce with:
Observe by setting a breakpoint in
SearchContext#docIdstoLoad(int[], int, int)
and notice that despite creating a brand new index with only one result theint[]
is sized at 100,000, to match the specified size.This is leading to unwanted memory pressure, and appears to be fixable by editing
SearchService#shortcutDocIdsToLoad(SearchContext)
to size thedocIdsToLoad
array to the actual number of results.The text was updated successfully, but these errors were encountered: