385
edits
(Complete rewrite of the behavior for mozilla 1.9(.1)) |
(Extra first-chunk queries: adaptive and keywords) |
||
| Line 28: | Line 28: | ||
== Search database and save matches == | == Search database and save matches == | ||
The bulk of the history processing is in this stage, and it consists mostly of executing a SQL query and filtering results. | The bulk of the history processing is in this stage, and it consists mostly of executing a SQL query and filtering results. There's also some special behavior for the first chunk for adaptive learning and keyword searches. | ||
=== Query database === | === Query database === | ||
| Line 47: | Line 47: | ||
The style of the page is to let the front-end know if it's a plain page, bookmarked page, etc. | The style of the page is to let the front-end know if it's a plain page, bookmarked page, etc. | ||
=== Extra first-chunk queries == | |||
The previous sections described the general query and filtering process focusing on a full-history search that happens for every chunk. There are a couple additional queries that use the same structure as above, but provide a different set of results. | |||
The first is adaptive learning that shows pages that users have previously selected from the autocomplete when typing a similar query. The query is slightly different as it uses another table to look up previous query->page mappings, but it goes through the same filtering process. | |||
The second special query is to show smart keyword searches, where the first token in the query is the keyword and other tokens are additional search parameters. We look in the bookmarks database to find a matching keyword and insert the search parameters into the "%s" portion of the bookmark url. | |||
== Update search status == | == Update search status == | ||
edits