Skip to content

Commit d3aede0

Browse files
authored
Increase description weight from 0.9 to 1.0 (#8246)
1 parent 1cff64b commit d3aede0

File tree

7 files changed

+19
-18
lines changed

7 files changed

+19
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Important changes to data models, configuration, and migrations between each
22
AppEngine version, listed here to ease deployment and troubleshooting.
33

44
## Next Release (replace with git tag when deployed)
5+
* Note: `search` increased `description` weight from `0.9` to `1.0`.
56

67
## `20241107t132800-all`
78
* `search` uses the `IndexedScore` to reduce memory allocations.

app/lib/search/mem_index.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class InMemoryPackageIndex {
305305

306306
final wordScore =
307307
_packageNameIndex.searchWord(word, filterOnNonZeros: packageScores);
308-
_descrIndex.searchAndAccumulate(word, weight: 0.90, score: wordScore);
308+
_descrIndex.searchAndAccumulate(word, score: wordScore);
309309
_readmeIndex.searchAndAccumulate(word, weight: 0.75, score: wordScore);
310310
packageScores.multiplyAllFrom(wordScore);
311311
}

app/test/search/bluetooth_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void main() {
4040
'packageHits': [
4141
{
4242
'package': 'flutter_blue',
43-
'score': closeTo(0.89, 0.01),
43+
'score': closeTo(0.98, 0.01),
4444
},
4545
],
4646
});

app/test/search/in_app_payments_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Add _In-App Payments_ to your Flutter app with this plugin.''')),
5252
'packageHits': [
5353
{
5454
'package': 'flutter_iap',
55-
'score': closeTo(0.57, 0.01),
55+
'score': closeTo(0.70, 0.01),
5656
},
5757
],
5858
});

app/test/search/json_tool_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void main() {
6969
'sdkLibraryHits': [],
7070
'packageHits': [
7171
{'package': 'jsontool', 'score': 1.0},
72-
{'package': 'json2entity', 'score': closeTo(0.87, 0.01)},
72+
{'package': 'json2entity', 'score': closeTo(0.97, 0.01)},
7373
{'package': 'json_to_model', 'score': closeTo(0.73, 0.01)},
7474
],
7575
});

app/test/search/mem_index_test.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
109109
'packageHits': [
110110
{
111111
'package': 'http',
112-
'score': closeTo(0.85, 0.01),
112+
'score': closeTo(0.93, 0.01),
113113
},
114114
],
115115
});
@@ -140,7 +140,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
140140
'sdkLibraryHits': [],
141141
'packageHits': [
142142
{'package': 'http', 'score': closeTo(0.69, 0.01)},
143-
{'package': 'async', 'score': closeTo(0.57, 0.01)},
143+
{'package': 'async', 'score': closeTo(0.63, 0.01)},
144144
],
145145
});
146146
});
@@ -381,7 +381,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
381381
'totalCount': 1,
382382
'sdkLibraryHits': [],
383383
'packageHits': [
384-
{'package': 'http', 'score': closeTo(0.85, 0.01)},
384+
{'package': 'http', 'score': closeTo(0.93, 0.01)},
385385
],
386386
});
387387
});
@@ -494,7 +494,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
494494
'totalCount': 1,
495495
'sdkLibraryHits': [],
496496
'packageHits': [
497-
{'package': 'http', 'score': closeTo(0.87, 0.01)},
497+
{'package': 'http', 'score': closeTo(0.98, 0.01)},
498498
],
499499
});
500500

@@ -505,8 +505,8 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
505505
'totalCount': 3,
506506
'sdkLibraryHits': [],
507507
'packageHits': [
508-
{'package': 'chrome_net', 'score': closeTo(0.88, 0.01)},
509-
{'package': 'async', 'score': closeTo(0.88, 0.01)},
508+
{'package': 'chrome_net', 'score': closeTo(0.98, 0.01)},
509+
{'package': 'async', 'score': closeTo(0.98, 0.01)},
510510
{'package': 'http', 'score': closeTo(0.72, 0.01)},
511511
],
512512
});
@@ -520,7 +520,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
520520
'totalCount': 1,
521521
'sdkLibraryHits': [],
522522
'packageHits': [
523-
{'package': 'http', 'score': closeTo(0.63, 0.01)},
523+
{'package': 'http', 'score': closeTo(0.70, 0.01)},
524524
],
525525
});
526526
});
@@ -615,8 +615,8 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
615615
'totalCount': 2,
616616
'sdkLibraryHits': [],
617617
'packageHits': [
618-
{'package': 'def', 'score': closeTo(0.69, 0.01)},
619-
{'package': 'abc', 'score': closeTo(0.42, 0.01)},
618+
{'package': 'def', 'score': closeTo(0.77, 0.01)},
619+
{'package': 'abc', 'score': closeTo(0.47, 0.01)},
620620
]
621621
},
622622
);
@@ -629,7 +629,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
629629
'sdkLibraryHits': [],
630630
'packageHits': [
631631
// `abc` is at its natural place
632-
{'package': 'def', 'score': closeTo(0.69, 0.01)},
632+
{'package': 'def', 'score': closeTo(0.77, 0.01)},
633633
{'package': 'abc', 'score': closeTo(0.48, 0.01)},
634634
]
635635
});
@@ -644,7 +644,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
644644
'sdkLibraryHits': [],
645645
'packageHits': [
646646
// `abc` is at its natural place
647-
{'package': 'def', 'score': closeTo(0.69, 0.01)},
647+
{'package': 'def', 'score': closeTo(0.77, 0.01)},
648648
{'package': 'abc', 'score': closeTo(0.48, 0.01)},
649649
]
650650
});
@@ -659,7 +659,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
659659
'sdkLibraryHits': [],
660660
'packageHits': [
661661
// `abc` is not present in the package list
662-
{'package': 'def', 'score': closeTo(0.69, 0.01)},
662+
{'package': 'def', 'score': closeTo(0.77, 0.01)},
663663
]
664664
});
665665
});
@@ -690,7 +690,7 @@ server.dart adds a small, prescriptive server (PicoServer) that can be configure
690690
'sdkLibraryHits': [],
691691
'packageHits': [
692692
{'package': 'flutter_modular', 'score': 1.0},
693-
{'package': 'serveme', 'score': closeTo(0.87, 0.01)},
693+
{'package': 'serveme', 'score': closeTo(0.97, 0.01)},
694694
]
695695
},
696696
);

app/test/search/rest_api_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Recent versions (0.3.x and 0.4.x) of this plugin require [extensible codec funct
5757
'packageHits': [
5858
{
5959
'package': 'currency_cloud',
60-
'score': closeTo(0.77, 0.01),
60+
'score': closeTo(0.95, 0.01),
6161
},
6262
{
6363
'package': 'cloud_firestore', // finds `rest` in name

0 commit comments

Comments
 (0)