@@ -1464,11 +1464,6 @@ class DocSearch {
1464
1464
* @type {Map<String, RoaringBitmap> }
1465
1465
*/
1466
1466
this . searchIndexEmptyDesc = new Map ( ) ;
1467
- /**
1468
- * @type {Map<String, RoaringBitmap> }
1469
- */
1470
- this . searchIndexUnstable = new Map ( ) ;
1471
-
1472
1467
/**
1473
1468
* @type {Uint32Array }
1474
1469
*/
@@ -2057,12 +2052,9 @@ class DocSearch {
2057
2052
} ;
2058
2053
const descShardList = [ descShard ] ;
2059
2054
2060
- // Deprecated and unstable items and items with no description
2055
+ // Deprecated items and items with no description
2061
2056
this . searchIndexDeprecated . set ( crate , new RoaringBitmap ( crateCorpus . c ) ) ;
2062
2057
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
- }
2066
2058
let descIndex = 0 ;
2067
2059
2068
2060
/**
@@ -3334,25 +3326,6 @@ class DocSearch {
3334
3326
return a - b ;
3335
3327
}
3336
3328
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
-
3356
3329
// sort by crate (current crate comes first)
3357
3330
a = Number ( aaa . item . crate !== preferredCrate ) ;
3358
3331
b = Number ( bbb . item . crate !== preferredCrate ) ;
0 commit comments