This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch doc5.0
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 04f81da701827a8d26aa185b323e0d299d09bb41
Author: Mukvin <boyboys...@163.com>
AuthorDate: Tue Aug 16 19:02:10 2022 +0800

    KYLIN-5221 add search feature
---
 .../operations/access-control/user_management.md   |  2 +-
 .../operations/monitoring/influxdb/influxdb.md     |  2 +-
 .../system-operation/diagnosis/diagnosis.md        |  2 +-
 .../operations/system-operation/junk_file_clean.md |  2 +-
 .../docs/restapi/model_api/model_management_api.md |  8 +--
 website/docs/restapi/project_api.md                |  2 +-
 website/docusaurus.config.js                       | 77 +++++++++++++++++++++-
 website/package.json                               |  1 +
 8 files changed, 86 insertions(+), 10 deletions(-)

diff --git a/website/docs/operations/access-control/user_management.md 
b/website/docs/operations/access-control/user_management.md
index 0b7a4fdfd6..f553776846 100644
--- a/website/docs/operations/access-control/user_management.md
+++ b/website/docs/operations/access-control/user_management.md
@@ -67,7 +67,7 @@ $KYLIN_HOME/bin/admin-tool.sh admin-password-reset
 
 When the parameter `kylin.metadata.random-admin-password.enabled=false`, it 
will not regenerate a random password but the fixed password `KYLIN`. If the 
parameter `kylin.metadata.random-admin-password.enabled` is set from `false` to 
`true` , it will regenerate a random password and display it on the console 
after all the Kylin nodes restarted.
 
-**Caution** When run this command, Kylin will enter maintenance mode. If the 
command is interrupted by force, you may need to exit maintain mode manually. 
Refer to [maintenance_mode](../system-operation/maintenance_mode.en.md).
+**Caution** When run this command, Kylin will enter maintenance mode. If the 
command is interrupted by force, you may need to exit maintain mode manually. 
Refer to [maintenance_mode](../system-operation/maintenance_mode.md).
 
 
 ### <span id="pwd">Reset password for Non-admin</span>
diff --git a/website/docs/operations/monitoring/influxdb/influxdb.md 
b/website/docs/operations/monitoring/influxdb/influxdb.md
index efc00a2782..dfaa38a3c0 100644
--- a/website/docs/operations/monitoring/influxdb/influxdb.md
+++ b/website/docs/operations/monitoring/influxdb/influxdb.md
@@ -196,7 +196,7 @@ To ensure the connectivity of InfluxDB service, it is 
recommended that you perfo
   ```
   If the query fails and the message `authorization failed` is displayed, 
please confirm whether the user has sufficient permissions.
 
-For more information about InfluxDB connectivity, please refer to the 
[InfluxDB 
Maintenance](../../Operation-and-Maintenance-Guide/influxdb/influxdb_maintenance.en.md)
 section.
+For more information about InfluxDB connectivity, please refer to the 
[InfluxDB Maintenance](influxdb_maintenance.md) section.
 
 
 
diff --git a/website/docs/operations/system-operation/diagnosis/diagnosis.md 
b/website/docs/operations/system-operation/diagnosis/diagnosis.md
index 7f16a0475c..0527c12bad 100644
--- a/website/docs/operations/system-operation/diagnosis/diagnosis.md
+++ b/website/docs/operations/system-operation/diagnosis/diagnosis.md
@@ -22,7 +22,7 @@ last_update:
 
 Kylin users may face with many problems during usage, such as  job failure, 
SQL query failure, SQL query overtime, etc. In order to help solve these 
problems efficiently, Kylin provides a *Diagnosis* function on Web UI to pack 
related information into a zip package to help operation staff and Kyligence 
Support team to analyze the root cause. 
 
-Diagnosis function includes System, Job and Query Diagnosis. In addition to 
the method of generating diagnostic package on web UI described in this 
chapter, you can also generate the diagnostic package through the bash script. 
For details, please refer to [Diagnosis Tool](cli_tool/diagnosis.en.md).
+Diagnosis function includes System, Job and Query Diagnosis. In addition to 
the method of generating diagnostic package on web UI described in this 
chapter, you can also generate the diagnostic package through the bash script. 
For details, please refer to [Diagnosis Tool](../cli_tool/diagnosis.md).
 
 
 ### Generate System Diagnostic Package in Web UI
diff --git a/website/docs/operations/system-operation/junk_file_clean.md 
b/website/docs/operations/system-operation/junk_file_clean.md
index 6bd6008ed8..8fcfbcdb1b 100644
--- a/website/docs/operations/system-operation/junk_file_clean.md
+++ b/website/docs/operations/system-operation/junk_file_clean.md
@@ -81,7 +81,7 @@ This command supports standard short and long parameters. The 
parameter descript
 - `-r number`: The number of requests per second when accessing cloud 
environment object storage. `-r 10` means 10 requests per second. You can use 
this parameter to limit the frequency of requests for object storage in the 
cloud environment by the junk file cleaning tool to avoid errors due to 
exceeding the request frequency limit.
 - `-t number`: The number of request retries when accessing the cloud 
environment object storage fails. `-t 3` means to retry 3 times.
 
-**Note**: Whether this command executes metadata junk file cleaning through -m 
or data junk file cleaning through -c, Kylin will enter maintenance mode. If 
junk file cleaning is forcibly interrupted, you need to manually exit 
maintenance mode. Refer to [ Maintenance 
Mode](system-operation/maintenance_mode.en.md).
+**Note**: Whether this command executes metadata junk file cleaning through -m 
or data junk file cleaning through -c, Kylin will enter maintenance mode. If 
junk file cleaning is forcibly interrupted, you need to manually exit 
maintenance mode. Refer to [ Maintenance Mode](maintenance_mode.md).
 
 In addition, from Kylin 4.5.6, the new command line tool `FastRoutineTool`
 ````sh
diff --git a/website/docs/restapi/model_api/model_management_api.md 
b/website/docs/restapi/model_api/model_management_api.md
index 93757f8a99..b77fcd281b 100644
--- a/website/docs/restapi/model_api/model_management_api.md
+++ b/website/docs/restapi/model_api/model_management_api.md
@@ -89,7 +89,7 @@ last_update:
       - `primary_key` - `required` `string[]`, primary key
       - `simplified_non_equi_join_conditions` -  `optional` `JSON Object`, 
non-equivalent join conditions
 
-        (note1: The support of this settings should have 'Support History 
Table' enabled in advance. Seeing [Slowly Changing 
Dimension](../../../Designers-Guide/model/model_design/slowly_changing_dimension.en.md))
+        (note1: The support of this settings should have 'Support History 
Table' enabled in advance. Seeing [Slowly Changing Dimension](#TODO))
 
         (note2: Join relationship >= and < must be used in pairs, and same 
column must be joint in both conditions)
 
@@ -102,7 +102,7 @@ last_update:
     - `join_relation_type` -  `optional` `string`, join type: 
MANY_TO_ONE,MANY_TO_MANY, default: MANY_TO_ONE
   - `partition_desc` -  `optional` `JSON Object`, partition columns info
     - `partition_date_column` - `required` `string`, partition date column, 
format: TABLE.COLUMN
-    - `partition_date_format` - `required` `string`, partition date column 
format, including: yyyy-MM-dd, yyyyMMdd... Supported date format please check 
"[Model Design 
Basics](../../../Designers-Guide/model/model_design/data_modeling.en.md#faq)"
+    - `partition_date_format` - `required` `string`, partition date column 
format, including: yyyy-MM-dd, yyyyMMdd... Supported date format please check 
"[Model Design Basics](#TODO)"
     - `partition_type` -  `optional` `string`, partition type, including: 
APPEND, default: APPEND
   - `owner` -  `optional` `string`, the owner of model, default current user
   - `description` -  `optional` `string`, model description
@@ -360,7 +360,7 @@ last_update:
 
   > [!NOTE]
   >
-  > For parameters not listed in this page, you may go to the [Kylin 
Console](../../../Designers-Guide/model/model_concepts_operations.en.md) for 
details.
+  > For parameters not listed in this page, you may go to the [Kylin 
Console](#TODO) for details.
 
   ```json
     {
@@ -504,7 +504,7 @@ last_update:
         - `hierarchy_dims`: `JSON`, dimension hierarchy
         - `mandatory_dims`: `JSON`, required hierarchy
         - `joint_dims`:  `JSON`, joint dimensions
-        - `computed_columns`: `JSON`, [Computed 
Column](../../../Designers-Guide/model/model_design/computed_column/README.md)
+        - `computed_columns`: `JSON`, [Computed Column](#TODO)
         - `tableIdentity`: `String`, table ID
         - `tableAlias`: `String`, table alias
         - `columnName`: `String`, column name
diff --git a/website/docs/restapi/project_api.md 
b/website/docs/restapi/project_api.md
index 433d1cff9c..646f140c13 100644
--- a/website/docs/restapi/project_api.md
+++ b/website/docs/restapi/project_api.md
@@ -561,7 +561,7 @@ last_update:
 
 ### <span id="update-job-engine">Update the Linking Relationship between 
Projects and Job Engines</span>
 
-**Note:** This Rest API need to cooperate with multi-active job engines. For 
more details, please refer to [Kylin Multi-Active Job 
Engines](../../../installation/deploy/cluster_lb.en.md).
+**Note:** This Rest API need to cooperate with multi-active job engines. For 
more details, please refer to [Kylin Multi-Active Job Engines](#TODO).
 
 - `POST http://host:port/kylin/api/epoch`
 
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index a396bd12b8..6e1036ed49 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -10,7 +10,7 @@ const config = {
   tagline: 'Kylin 5.0 is a unified and powerful OLAP platform for Hadoop and 
Cloud.',
   url: 'https://kylin.apache.org',
   baseUrl: '/',
-  onBrokenLinks: 'throw',
+  onBrokenLinks: 'warn',
   onBrokenMarkdownLinks: 'warn',
   favicon: 'img/favicon.ico',
 
@@ -20,6 +20,81 @@ const config = {
   projectName: 'kylin', // Usually your repo name.
   deploymentBranch:'kylin5_doc',
 
+  // add search plugin
+  plugins: [require.resolve("@cmfcmf/docusaurus-search-local")],
+  plugins: [
+    [
+      require.resolve("@cmfcmf/docusaurus-search-local"),
+      {
+        // Options here
+        // whether to index docs pages
+        indexDocs: true,
+
+        // Whether to also index the titles of the parent categories in the 
sidebar of a doc page.
+        // 0 disables this feature.
+        // 1 indexes the direct parent category in the sidebar of a doc page
+        // 2 indexes up to two nested parent categories of a doc page
+        // 3...
+        //
+        // Do _not_ use Infinity, the value must be a JSON-serializable 
integer.
+        indexDocSidebarParentCategories: 0,
+
+        // whether to index blog pages
+        indexBlog: true,
+
+        // whether to index static pages
+        // /404.html is never indexed
+        indexPages: false,
+
+        // language of your documentation, see next section
+        language: "en",
+
+        // setting this to "none" will prevent the default CSS to be included. 
The default CSS
+        // comes from autocomplete-theme-classic, which you can read more 
about here:
+        // 
https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-theme-classic/
+        // When you want to overwrite CSS variables defined by the default 
theme, make sure to suffix your
+        // overwrites with `!important`, because they might otherwise not be 
applied as expected. See the
+        // following comment for more information: 
https://github.com/cmfcmf/docusaurus-search-local/issues/107#issuecomment-1119831938.
+        style: undefined,
+
+        // The maximum number of search results shown to the user. This does 
_not_ affect performance of
+        // searches, but simply does not display additional search results 
that have been found.
+        maxSearchResults: 8,
+
+        // lunr.js-specific settings
+        lunr: {
+          // When indexing your documents, their content is split into 
"tokens".
+          // Text entered into the search box is also tokenized.
+          // This setting configures the separator used to determine where to 
split the text into tokens.
+          // By default, it splits the text at whitespace and dashes.
+          //
+          // Note: Does not work for "ja" and "th" languages, since these use 
a different tokenizer.
+          tokenizerSeparator: /[\s\-]+/,
+          // https://lunrjs.com/guides/customising.html#similarity-tuning
+          //
+          // This parameter controls the importance given to the length of a 
document and its fields. This
+          // value must be between 0 and 1, and by default it has a value of 
0.75. Reducing this value
+          // reduces the effect of different length documents on a term’s 
importance to that document.
+          b: 0.75,
+          // This controls how quickly the boost given by a common word 
reaches saturation. Increasing it
+          // will slow down the rate of saturation and lower values result in 
quicker saturation. The
+          // default value is 1.2. If the collection of documents being 
indexed have high occurrences
+          // of words that are not covered by a stop word filter, these words 
can quickly dominate any
+          // similarity calculation. In these cases, this value can be reduced 
to get more balanced results.
+          k1: 1.2,
+          // By default, we rank pages where the search term appears in the 
title higher than pages where
+          // the search term appears in just the text. This is done by 
"boosting" title matches with a
+          // higher value than content matches. The concrete boosting behavior 
can be controlled by changing
+          // the following settings.
+          titleBoost: 5,
+          contentBoost: 1,
+          tagsBoost: 3,
+          parentCategoriesBoost: 2, // Only used when 
indexDocSidebarParentCategories > 0
+        }
+      },
+    ],
+  ],
+
   // Even if you don't use internalization, you can use this field to set 
useful
   // metadata like html lang. For example, if your site is Chinese, you may 
want
   // to replace "en" with "zh-Hans".
diff --git a/website/package.json b/website/package.json
index eefe7e1f30..b70eccf338 100644
--- a/website/package.json
+++ b/website/package.json
@@ -14,6 +14,7 @@
     "write-heading-ids": "docusaurus write-heading-ids"
   },
   "dependencies": {
+    "@cmfcmf/docusaurus-search-local": "^0.11.0",
     "@docusaurus/core": "2.0.1",
     "@docusaurus/preset-classic": "2.0.1",
     "@mdx-js/react": "^1.6.22",

Reply via email to