angular-cn/aio/tools/transforms/angular-base-package/processors
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
..
checkContentRules.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
checkContentRules.spec.js build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
checkUnbalancedBackTicks.js refactor(docs-infra): refactors `checkUnbalancedBackTicks` (#37065) 2020-05-15 10:13:19 -07:00
checkUnbalancedBackTicks.spec.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
convertToJson.js build(aio): use the captured h1 as the title if necessary 2017-05-31 08:45:31 +03:00
convertToJson.spec.js test(docs-infra): run tests in random order (and make them pass) (#31527) 2019-07-18 10:17:13 -07:00
copyContentAssets.js build(aio): auto-fill width/height to all image tags 2017-05-01 15:52:51 -07:00
copyContentAssets.spec.js build(aio): move copyContentAssets processor to the base package 2017-05-01 15:52:51 -07:00
createSitemap.js feat(docs-infra): created new widget for events page (#36517) 2020-09-16 15:14:18 -07:00
createSitemap.spec.js test(docs-infra): remove usage of blacklist in test naming (#38927) 2020-09-23 15:46:02 -04:00
fixInternalDocumentLinks.js build(aio): refactor dgeni packages 2017-04-23 22:50:33 +01:00
fixInternalDocumentLinks.spec.js docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
generateKeywords.js refactor(docs-infra): include more info in search index data (#41368) 2021-04-01 12:02:37 -07:00
generateKeywords.spec.js refactor(docs-infra): include more info in search index data (#41368) 2021-04-01 12:02:37 -07:00
renderLinkInfo.js build(aio): append information about links in and out of docs (#19583) 2017-10-10 17:06:51 -07:00
renderLinkInfo.spec.js build(aio): append information about links in and out of docs (#19583) 2017-10-10 17:06:51 -07:00
splitDescription.js build(docs-infra): error guides in docs (#40060) 2021-01-14 11:28:52 -08:00
splitDescription.spec.js build(docs-infra): error guides in docs (#40060) 2021-01-14 11:28:52 -08:00