@@ -1464,11 +1464,6 @@ class DocSearch {
14641464         * @type  {Map<String, RoaringBitmap> } 
14651465         */ 
14661466        this . searchIndexEmptyDesc  =  new  Map ( ) ; 
1467-         /** 
1468-          * @type  {Map<String, RoaringBitmap> } 
1469-          */ 
1470-         this . searchIndexUnstable  =  new  Map ( ) ; 
1471- 
14721467        /** 
14731468         *  @type  {Uint32Array } 
14741469         */ 
@@ -2057,12 +2052,9 @@ class DocSearch {
20572052            } ; 
20582053            const  descShardList  =  [ descShard ] ; 
20592054
2060-             // Deprecated and unstable  items and items with no description 
2055+             // Deprecated items and items with no description 
20612056            this . searchIndexDeprecated . set ( crate ,  new  RoaringBitmap ( crateCorpus . c ) ) ; 
20622057            this . searchIndexEmptyDesc . set ( crate ,  new  RoaringBitmap ( crateCorpus . e ) ) ; 
2063-             if  ( crateCorpus . u  !==  undefined  &&  crateCorpus . u  !==  null )  { 
2064-                 this . searchIndexUnstable . set ( crate ,  new  RoaringBitmap ( crateCorpus . u ) ) ; 
2065-             } 
20662058            let  descIndex  =  0 ; 
20672059
20682060            /** 
@@ -3334,25 +3326,6 @@ class DocSearch {
33343326                    return  a  -  b ; 
33353327                } 
33363328
3337-                 // sort unstable items later 
3338-                 // FIXME: there is some doubt if this is the most effecient way to implement this. 
3339-                 // alternative options include: 
3340-                 // * put is_unstable on each item when the index is built. 
3341-                 //   increases memory usage but avoids a hashmap lookup. 
3342-                 // * put is_unstable on each item before sorting. 
3343-                 //   better worst case performance but worse average case performance. 
3344-                 a  =  Number ( 
3345-                     // @ts -expect-error 
3346-                     this . searchIndexUnstable . get ( aaa . item . crate ) . contains ( aaa . item . bitIndex ) , 
3347-                 ) ; 
3348-                 b  =  Number ( 
3349-                     // @ts -expect-error 
3350-                     this . searchIndexUnstable . get ( bbb . item . crate ) . contains ( bbb . item . bitIndex ) , 
3351-                 ) ; 
3352-                 if  ( a  !==  b )  { 
3353-                     return  a  -  b ; 
3354-                 } 
3355- 
33563329                // sort by crate (current crate comes first) 
33573330                a  =  Number ( aaa . item . crate  !==  preferredCrate ) ; 
33583331                b  =  Number ( bbb . item . crate  !==  preferredCrate ) ; 
0 commit comments