Understanding differences between HistoryURL and HistoryQuick providers, and exact conditions for when a URL is suggested by each

46 views
Skip to first unread message

Issa Rice

unread,
Aug 24, 2018, 6:02:48 PM8/24/18
to Chromium-dev
Hi,

I am trying to understand the exact conditions for when a URL from one's history is displayed as a suggestion in the omnibox.

Here is what I understand so far:

* The AutocompleteProvider class gives suggestions to the omnibox.
* HistoryProvider is a subclass of AutocompleteProvider that specifically sends history suggestions.
* HistoryProvider has two non-test subclasses, HistoryQuickProvider and HistoryURLProvider.
* Both HistoryQuick and HistoryURL providers use the kLowQualityMatch constants (I am inferring this from the "If a URL doesn't meet any of these bars, it's de-indexed.  Neither HQP nor HUP will return it." and "Just loosening them in RowQualifiesAsSignificant() will affect both HUP and HQP" in https://bugs.chromium.org/p/chromium/issues/detail?id=692386)

I have not tried digging into the code much, relying mainly on bug/mailing list postings and comments in the code.

My main questions are:

1. When does a URL from the history show up in the omnibox? Is it URLs visited in the last 3 days or visited at least 4 times or typed at least once? What are the rules for when a keyword matches?
2. Do HistoryURL and HistoryQuick differ in the URLs they return, or only in terms of speed and synchronicity? (They seem to differ in terms of URLs returned, based on playing around with chrome://omnibox/, and people seem to talk about scoring differences, e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=692386 .) If they differ in the URLs returned, what is the difference?
3. What are the exceptions mentioned in "even those providers have exceptions" in https://groups.google.com/a/chromium.org/d/msg/chromium-dev/isbaUGoVJ4Q/z-yTDfWeBAAJ (One possible exception I've found is when the session length is longer than three days, and one has visited the URL more than three days ago during the current session.)
4. How up-to-date is the material on https://www.chromium.org/omnibox-history-provider ?

Issa

Mark Pearson

unread,
Aug 30, 2018, 2:37:59 PM8/30/18
to rice...@gmail.com, Chromium-dev

Greetings -

replies inline

On Fri, Aug 24, 2018 at 3:01 PM Issa Rice <rice...@gmail.com> wrote:
Hi,

I am trying to understand the exact conditions for when a URL from one's history is displayed as a suggestion in the omnibox.

Here is what I understand so far:

* The AutocompleteProvider class gives suggestions to the omnibox.
* HistoryProvider is a subclass of AutocompleteProvider that specifically sends history suggestions.
* HistoryProvider has two non-test subclasses, HistoryQuickProvider and HistoryURLProvider.
* Both HistoryQuick and HistoryURL providers use the kLowQualityMatch constants (I am inferring this from the "If a URL doesn't meet any of these bars, it's de-indexed.  Neither HQP nor HUP will return it." and "Just loosening them in RowQualifiesAsSignificant() will affect both HUP and HQP" in https://bugs.chromium.org/p/chromium/issues/detail?id=692386)
Everything up to here is correct.
HistoryURL is indeed older.  However, it's unlikely that HistoryQuick will replace it entirely, as our past experiments doing so have resulted in a poorer omnibox experience.
Both true. :-) 

I have not tried digging into the code much, relying mainly on bug/mailing list postings and comments in the code.

My main questions are:

1. When does a URL from the history show up in the omnibox? Is it URLs visited in the last 3 days or visited at least 4 times or typed at least once?
Yup, those results are correct.  HistoryURL specializes in returning prefix matches (the user types the beginning of a URL).  HistoryQuick can return anything based on matches anywhere. 
What are the rules for when a keyword matches?
Each word in the omnibox input has to "match" somewhere in the URL or the title of the page.  These matches generally have to be at a word break.  For example, a "." or " " or "/"--that kind of thing--has to come immediately before the word.  There can be text after that matching part.  Thus, the input "sun" will match "sunset".  It'll also match "sun's".  For longer inputs, we don't require that every word match at a word boundary.  If some match at a word boundary and some do not, that's okay.  Thus, the input "gle mail" suggests "Google Mail" for me.

2. Do HistoryURL and HistoryQuick differ in the URLs they return, or only in terms of speed and synchronicity? (They seem to differ in terms of URLs returned, based on playing around with chrome://omnibox/, and people seem to talk about scoring differences, e.g. https://bugs.chromium.org/p/chromium/issues/detail?id=692386 .) If they differ in the URLs returned, what is the difference?
Yes, they differ.

HistoryURL provider only returns URLs in which the omnibox input is a prefix of the URL: "goo" for "google.com" for example.

HistoryQuick provider does the more sophisticated matching above.

Otherwise they obey the rules set forth in item #1.

3. What are the exceptions mentioned in "even those providers have exceptions" in https://groups.google.com/a/chromium.org/d/msg/chromium-dev/isbaUGoVJ4Q/z-yTDfWeBAAJ (One possible exception I've found is when the session length is longer than three days, and one has visited the URL more than three days ago during the current session.)
I'm not exactly sure what I was thinking of when I wrote that message you link to. :-)  One exception that comes to mind right now is that HistoryURL provider may suggest a URL that hasn't been visited.  In particular, if you've visited a subpage of an intranet host (http://foo/bar.html), and you type "fo", it may suggest "http://foo/" because it will infer it exists and may be relevant.

4. How up-to-date is the material on https://www.chromium.org/omnibox-history-provider ?
While that page hasn't been updated in years (not since the provider was built), it remains accurate.  I gave it a quick read-through and did not see any obvious errors / things that are out-of-date.

cheers,
mark

P.S.  I'm curious about your interest in the omnibox.  Do you want to contribute to improving it?  If you want to talk more personally about this, feel free to follow up with me off-thread.


Issa

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/7d2259f6-4074-44ea-b9e4-e8f359a4a722%40chromium.org.

Issa Rice

unread,
Sep 7, 2018, 11:32:07 PM9/7/18
to Chromium-dev, rice...@gmail.com
Hello Mark,

Thank you for the reply; it was very helpful!

To respond to your postscript, I was working on an article on wikiHow: https://www.wikihow.com/Navigate-to-Web-Pages-Efficiently-Without-Using-Navigation-Menus Specifically, the section dealing with the omnibox (for which your email was helpful) is: https://www.wikihow.com/Navigate-to-Web-Pages-Efficiently-Without-Using-Navigation-Menus#Understanding_How_the_Omnibox_Works_.28Chrome.29_sub

Issa
Reply all
Reply to author
Forward
0 new messages