angular-docs-cn/aio/src
Pete Bacon Darwin fccffc647b refactor(docs-infra): include more info in search index data (#41368)
The AIO search index is built in a WebWorker on the browser from a set
of page information that is downloaded as a JSON file (`search-data.json`).
We want to keep this file as small as possible while providing enough
data to generate a useful index to query against.

Previously, we only included one copy of each (non-ignored) term from each
doc but this prevents more subtle ranking of query results, since the number
of occurences of a term in a doc is lost.

This commit changes the generated file in the following ways:

- All non-ignored terms are now included in the order in which they appear
  in the doc.
- The terms are indexed into a dictonary to avoid the text of the term being
  repeated in every doc that contains the term.
- Each term is pre-"stemmed" using the same Porter Stemming algorith that the
  Lunr search engine uses.

The web-worker has been updated to decode the new format of the file.
Now that all terms are included, it may enable some level of phrase based
matching in the future.

The size of the generated file is considerably larger than previously, but
on production HTTP servers the data is sent compressed, which reduces the
size dramatically.

PR Close #41368
2021-04-01 12:02:37 -07:00
..
app refactor(docs-infra): include more info in search index data (#41368) 2021-04-01 12:02:37 -07:00
assets fix(docs-infra): fix display of AngularJS logo on the "Press kit" page in IE11 (#41183) 2021-03-12 13:22:57 -08:00
environments build(docs-infra): add new angular.io build configuration for release-candidates (#39470) 2020-11-02 07:57:51 -08:00
extra-files docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
styles fix(docs-infra): increase the max width of the `file-not-found` page (#41275) 2021-04-01 11:36:44 -07:00
testing refactor(docs-infra): enable tslint rules for the angular.io app (#39307) 2020-12-17 10:02:38 -08:00
404-body.html fix(docs-infra): generate the `404.html` page correctly (#41163) 2021-03-11 09:30:03 -08:00
custom-elements-es5-polyfills.js fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183) 2021-03-12 13:22:57 -08:00
google385281288605d160.html build(aio): add google webmaster tools verification file 2017-05-26 01:25:58 -07:00
index.html fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183) 2021-03-12 13:22:57 -08:00
main.ts feat(docs-infra): Convert AIO to use the new Service Worker 5.0.0. (#19795) 2018-08-27 16:30:42 -04:00
noop-worker-basic.js feat(aio): provide noop service worker file 2017-05-26 14:24:41 +01:00
polyfills.ts fix(docs-infra): avoid unnecessarily loading Custom Elements ES5 shim (#41162) 2021-03-11 09:25:32 -08:00
pwa-manifest.json feat(docs-infra): add shortcuts for the angular.io PWA (#40393) 2021-01-15 10:38:39 -08:00
test.ts docs: update docs to use new zone.js entry-points (#40823) 2021-02-24 07:58:29 -08:00