[omnibox] Experiment with midword matching for HistoryQuick suggestions.
Currently, midword matches disqualify HistoryQuick suggestions. E.g. the
input 'java script' won't match a suggestion titled 'javascript'. This
CL adds 2 flags to experiment with alternatives allowing midword
matching.
1) Midword matches are allowed and scored when the match begins
immediately after the previous match ends. E.g. 'java script' will match
but the input 'java cript' won't.
2) Terms with no wordstart matches are ignored, i.e. allowed but not
scored. E.g. both inputs 'java script' and 'java cript' will match and
score equivalently.
E.g.,
Suggestion URL: stackoverflow.com/questions/...
Suggestion title: javascript ...
Relevance scores:
input no exp exp 1 exp 2 exp 1 & 2
------------------------------------------------------
java script 0 1311 1303 1311
java cript 0 0 1303 1303
java 1311 1311 1311 1311
ques tion 0 1311 1311 1311
ques ion 0 0 1303 1303
ques 1311 1311 1311 1311
Bug: 591981
Change-Id: If06e5fc502fde366c1c211c72bfcaa092e0693d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1998169
Commit-Queue: manuk hovanesian <[email protected]>
Reviewed-by: Tommy Li <[email protected]>
Cr-Commit-Position: refs/heads/master@{#731055}
diff --git a/components/omnibox/common/omnibox_features.cc b/components/omnibox/common/omnibox_features.cc
index 47360011..5df7901 100644
--- a/components/omnibox/common/omnibox_features.cc
+++ b/components/omnibox/common/omnibox_features.cc
@@ -294,6 +294,23 @@
const base::Feature kOmniboxExperimentalSuggestScoring{
"OmniboxExperimentalSuggestScoring", base::FEATURE_DISABLED_BY_DEFAULT};
+// If disabled, terms with no wordstart matches disqualify the suggestion. If
+// enabled, terms with no wordstart matches are allowed but not scored. E.g.,
+// both inputs 'java script' and 'java cript' will match a suggestion titled
+// 'javascript' and score equivalently.
+const base::Feature kHistoryQuickProviderAllowButDoNotScoreMidwordTerms{
+ "OmniboxHistoryQuickProviderAllowButDoNotScoreMidwordTerms",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
+// If disabled, midword matches are ignored and input terms with no wordstart
+// matches are scored 0, resulting in an overall score of 0. If enabled, midword
+// matches are allowed and scored when they begin immediately after the previous
+// match ends. E.g. 'java script' will match a suggestion titled 'javascript'
+// but the input 'java cript' won't.
+const base::Feature kHistoryQuickProviderAllowMidwordContinuations{
+ "OmniboxHistoryQuickProviderAllowMidwordContinuations",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
// If enabled, shows a confirm dialog before removing search suggestions from
// the omnibox. See ConfirmNtpSuggestionRemovals for the NTP equivalent.
const base::Feature kConfirmOmniboxSuggestionRemovals{