Use IndexedScores in package and SDK doc page search + fixing weight. #8241
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
searchWordsmethod, and by applying the reuse of the internalIndexedScore, we spare Map building for multi-word searchesweighthandling: previously it was applied on each word, making the score of such queries really low. Instead, we should either reset it to1.0(as in Reduce the memory allocation during search with mutable IndexedScore. #8225), or use a power-exponent adjustment (as in the separate commit). I think the adjustment here is better for the understanding._scoreDocsis no longer usedsearchWords'slimitToIdsparameter is no longer used