@@ -72,7 +72,7 @@ class InMemoryPackageIndex {
7272 if (apiDocPages != null ) {
7373 for (final page in apiDocPages) {
7474 if (page.symbols != null && page.symbols! .isNotEmpty) {
75- apiDocPageKeys.add (IndexedApiDocPage (i, doc.package, page));
75+ apiDocPageKeys.add (IndexedApiDocPage (i, page));
7676 apiDocPageValues.add (page.symbols! .join (' ' ));
7777 }
7878 }
@@ -376,7 +376,8 @@ class InMemoryPackageIndex {
376376 // are multiplied. We can use a package filter that is applied after each
377377 // word to reduce the scope of the later words based on the previous results.
378378 /// However, API docs search should be filtered on the original list.
379- final packages = packageScores.toKeySet ();
379+ final indexedPositiveList = packageScores.toIndexedPositiveList ();
380+
380381 for (final word in words) {
381382 if (includeNameMatches && _documentsByName.containsKey (word)) {
382383 nameMatches ?? = < String > {};
@@ -406,7 +407,7 @@ class InMemoryPackageIndex {
406407 if (value < 0.01 ) continue ;
407408
408409 final doc = symbolPages.keys[i];
409- if (! packages. contains ( doc.package) ) continue ;
410+ if (! indexedPositiveList[ doc.index] ) continue ;
410411
411412 // skip if the previously found pages are better than the current one
412413 final pages =
@@ -660,8 +661,7 @@ class IndexedPackageHit {
660661
661662class IndexedApiDocPage {
662663 final int index;
663- final String package;
664664 final ApiDocPage page;
665665
666- IndexedApiDocPage (this .index, this .package, this . page);
666+ IndexedApiDocPage (this .index, this .page);
667667}
0 commit comments