Skip to content

Commit e0bbf3a

Browse files
committed
Do not restrict more than readme right now + log selected level.
1 parent 4c7bdda commit e0bbf3a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

app/lib/service/entrypoint/search_index.dart

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,25 @@ class LatencyAwareSearchIndex implements SearchIndex {
183183
int _selectTextMatchExtent() {
184184
final latency = _latencyTracker.getLatency();
185185
if (latency < const Duration(seconds: 1)) {
186+
_logger.info('[text-match-normal]');
186187
return TextMatchExtent.api;
187188
}
188189
if (latency < const Duration(seconds: 2)) {
190+
_logger.info('[text-match-readme]');
189191
return TextMatchExtent.readme;
190192
}
191193
if (latency < const Duration(seconds: 4)) {
192-
return TextMatchExtent.description;
194+
_logger.info('[text-match-description]');
195+
// TODO: use `TextMatchExtent.description` after we are confident about this change.
196+
return TextMatchExtent.readme;
193197
}
194198
if (latency < const Duration(seconds: 10)) {
195-
return TextMatchExtent.name;
199+
_logger.info('[text-match-name]');
200+
// TODO: use `TextMatchExtent.name` after we are confident about this change.
201+
return TextMatchExtent.readme;
196202
}
197-
return TextMatchExtent.none;
203+
// TODO: use `TextMatchExtent.none` after we are confident about this change.
204+
_logger.info('[text-match-none]');
205+
return TextMatchExtent.readme;
198206
}
199207
}

0 commit comments

Comments
 (0)