@@ -48,7 +48,6 @@ var Scorer = {
4848 const trimmedFilename = ( filename || "" ) . trim ( ) ;
4949 const trimmedDocName = ( docName || "" ) . trim ( ) ;
5050
51- const lowerTitle = trimmedTitle . toLowerCase ( ) ;
5251 const lowerDescription = trimmedDescription . toLowerCase ( ) ;
5352 const lowerFilename = trimmedFilename . toLowerCase ( ) ;
5453 const lowerDocName = trimmedDocName . toLowerCase ( ) ;
@@ -64,7 +63,6 @@ var Scorer = {
6463 const parentTitle =
6564 titleParts . length > 1 ? titleParts . slice ( 0 , - 1 ) . join ( "::" ) : "" ;
6665 const normalizedLeaf = _normalizeSearchSymbol ( leaf ) ;
67- const normalizedTitle = _normalizeSearchSymbol ( trimmedTitle ) ;
6866 const normalizedParent = _normalizeSearchSymbol ( parentTitle ) ;
6967 const normalizedLeafOnlyQuery = _normalizeSearchSymbol (
7068 query . includes ( "::" ) ? query . split ( "::" ) . pop ( ) : query ,
@@ -76,15 +74,6 @@ var Scorer = {
7674 ! / [ . : / _ ] / . test ( lowerQuery ) &&
7775 / ^ [ a - z 0 - 9 ] + $ / . test ( lowerQuery ) ;
7876
79- // Heuristic buckets
80- const looksLikeGenericConceptPage =
81- / ^ ( a l g o r i t h m s ? | t r a n s f o r m a t i o n s ? | u t i l i t i e s | o v e r v i e w | g u i d e | e x a m p l e s ? ) $ / i. test (
82- trimmedTitle ,
83- ) ||
84- / ( a p i d o c u m e n t a t i o n | a l g o r i t h m s | o v e r v i e w | g e n e r a l c o n c e p t s ) / i. test (
85- lowerDescription ,
86- ) ;
87-
8877 const looksLikeNamespaceQualified =
8978 / ^ [ a - z A - Z _ ] \w * ( : : [ a - z A - Z _ ] \w * ) + / . test ( trimmedTitle ) ;
9079
@@ -105,12 +94,9 @@ var Scorer = {
10594 const isConstructorLike =
10695 isNestedSymbol &&
10796 _normalizeSearchSymbol ( titleParts [ symbolDepth - 2 ] ) === normalizedLeaf ;
108- const hasQueryInTitle = lowerQuery && lowerTitle . includes ( lowerQuery ) ;
10997 const hasQueryInFilename =
11098 lowerQuery && lowerFilename . includes ( lowerQuery ) ;
11199 const hasQueryInDocName = lowerQuery && lowerDocName . includes ( lowerQuery ) ;
112- const hasStrongMetadataMatch =
113- hasQueryInTitle || hasQueryInFilename || hasQueryInDocName ;
114100 const isEnumeratorLike =
115101 / ( C \+ \+ e n u m e r a t o r \b ) / i. test ( trimmedDescription ) || / ^ [ A - Z 0 - 9 _ ] + $ / . test ( leaf ) ;
116102 const isInternalHelperLike =
@@ -121,10 +107,6 @@ var Scorer = {
121107 trimmedTitle ,
122108 ) ;
123109 const isPythonModuleLike = / ( P y t h o n m o d u l e \b ) / i. test ( trimmedDescription ) ;
124- const isCompactLeafMatch =
125- normalizedLeafOnlyQuery &&
126- normalizedLeaf . includes ( normalizedLeafOnlyQuery ) &&
127- normalizedLeaf . length <= normalizedLeafOnlyQuery . length + 18 ;
128110 const leafStartsWithQueryWord =
129111 queryWords . length === 1 && leafWords [ 0 ] === queryWords [ 0 ] ;
130112 const leafEndsWithQueryWord =
0 commit comments