You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
note: if the Node version available in your distro is old (`<=v16`), you can use [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) to pick a specific one.
47
47
48
-
for example to use node 18:
48
+
for example to use the appropriate version of node:
If you look closely, the path on disk does not match the URL. The URLs can be changed by setting the `slug` in the markdown file frontmatter.
159
181
160
182
## Introduce your topic {#introduce-your-topic}
183
+
161
184
The default first page in a folder (category in Docusaurus terminology) is a list of the pages in that folder. If you would like an intro or overview page, then add that page to `docs/en/coverpages/`. This example is addring an Architecture folder, so the full filename would be `docs/en/coverpages/architecture.md`
162
185
163
186
The next step depends on the location of the file in the nav. In this example, architecture is at the root level:
164
187
165
188
### Cover pages {#cover-pages}
189
+
166
190
Intros, cover pages, summaries--whatever you want to call them; it is important to provide the reader with a summary of a section
167
191
of the docs. The summary should let them know if they are in the right place. Also include at the bottom of the summary a link to relted content (blogs, videos, etc.)
168
192
The cover page is specified in `sidebars.js`, specifically with a `link` of type `doc`:
@@ -186,6 +210,7 @@ The cover page is specified in `sidebars.js`, specifically with a `link` of type
186
210
```
187
211
188
212
## Save time with reusable content {#save-time-with-reusable-content}
213
+
189
214
Many of the pages in the docs have a section toward the top about gathering the connection details for your ClickHouse service. Sending people off to look at a page to learn about the connection details and then having them forget what they were doing is a poor user experience. If you can just include the right instructions in the current doc, please do so. In general there are two interfaces that people will use when integrating some 3rd party software, or even `clickhouse client` to ClickHouse:
190
215
191
216
- HTTPS
@@ -213,10 +238,12 @@ Here is how the above renders:
213
238
## Avoid sending readers in circles {#avoid-sending-readers-in-circles}
214
239
215
240
### Links can be overdone {#links-can-be-overdone}
241
+
216
242
Every time you mention a feature or product you may be tempted to link to it. Don't do it. When peole see links
217
243
they can be tempted to visit them, and quite often there is no need for them to go to the linked content. If you mention a technique and you need the reader to learn it right then, add a link. If they should read about it later then add a link down at the bottom of the doc in a **What's next** section.
218
244
219
245
### Include content in the current doc instead {#include-content-in-the-current-doc-instead}
246
+
220
247
If you find yourself wanting to send the reader to another doc to perform a task before they perform the main task that you are writing about, then maybe that prerequisite task should be included in the current doc instead so the reader is not clicking back and forth. It may be time to create a snippet pull the content from the other doc into a snippet file and include it in the current doc and the other doc that you pulled it from (see [above](#save-time-with-reusable-content)).
221
248
222
249
## Avoid multiple pages for a single topic {#avoid-multiple-pages-for-a-single-topic}
@@ -355,125 +382,7 @@ When writing docs about a new feature it helps to be able to use the new feature
355
382
```bash
356
383
curl https://ClickHouse.com/ | sh
357
384
```
358
-
359
-
### Run unreleased builds in Docker {#run-unreleased-builds-in-docker}
360
-
361
-
```bash
362
-
docker pull clickhouse/clickhouse-server:head
363
-
```
364
-
365
-
```bash
366
-
docker run -d \
367
-
--cap-add=SYS_NICE \
368
-
--cap-add=NET_ADMIN \
369
-
--cap-add=IPC_LOCK \
370
-
--name some-clickhouse-server \
371
-
--ulimit nofile=262144:262144 \
372
-
clickhouse/clickhouse-server:head
373
-
```
374
-
375
-
## Tests: A great source of details {#tests-a-great-source-of-details}
376
-
377
-
If you want to run the tests from the `ClickHouse/tests` directory you either need a full release, a CI build, or to compile yourself. [How to get the binaries](https://clickhouse.com/docs/development/build/#you-dont-have-to-build-clickhouse)
378
-
379
-
### Extracting build from RPMs {#extracting-build-from-rpms}
380
-
381
-
If you want to extract the binary files from RPMs to use with the test `runner`, you can use `cpio`
These examples use env vars for the directory names:
441
-
442
-
- $DOCS is the parent directory of the ClickHouse repo
443
-
- $CHDIR is the parent directory of the extracted ClickHouse download files
444
-
445
-
For SQL tests:
446
-
447
-
The command to run the tests needs:
448
-
449
-
- The $PATH to use, with $CHDIR/usr/bin added to the $PATH
450
-
- The path to `clickhouse-test`
451
-
- The name of the test to run
452
-
453
-
For example, to run the test `01428_hash_set_nan_key`:
454
-
```bash
455
-
PATH=$CHDIR/usr/bin/:$PATH \
456
-
$DOCS/ClickHouse/tests/clickhouse-test \
457
-
01428_hash_set_nan_key
458
-
```
459
-
460
-
To see the queries that were run:
461
-
```bash
462
-
PATH=$CHDIR/usr/bin/$PATH \
463
-
clickhouse-client -q \
464
-
"select query from system.query_log ORDER BY event_time FORMAT Vertical"
465
-
```
466
-
467
-
For integration tests:
468
-
```bash
469
-
cd$DOCS/ClickHouse/tests/integration/
470
-
./runner -n 5 \
471
-
--src-dir $DOCS/ClickHouse/src \
472
-
--binary $CHDIR/usr/bin/clickhouse-server \
473
-
--cleanup-containers \
474
-
--command bash
475
-
```
476
-
477
386
## How to change code highlighting? {#how-to-change-code-highlighting}
478
387
479
388
Code highlighting is based on the language chosen for your code blocks. Specify the language when you start the code block:
@@ -495,7 +404,7 @@ If you need a language supported then open an issue in [ClickHouse-docs](https:/
495
404
496
405
At the moment there’s no easy way to do just that, but you can consider:
497
406
498
-
- To hit the “Watch” button on top of GitHub web interface to know as early as possible, even during pull request. Alternative to this is `#github-activity` channel of [public ClickHouse Slack](https://clickhouse.com/slack).
407
+
- To hit the "Watch" button on top of GitHub web interface to know as early as possible, even during pull request. Alternative to this is `#github-activity` channel of [public ClickHouse Slack](https://clickhouse.com/slack).
499
408
- Some search engines allow to subscribe on specific website changes via email and you can opt-in for that for https://clickhouse.com.
500
409
501
410
## Embedding videos {#embedding-videos}
@@ -534,46 +443,7 @@ And here is a Vimeo example from the Cloud landing page:
534
443
535
444
## Algolia {#algolia}
536
445
537
-
The docs are crawled daily. The configuration for the crawler is in the docs-private repo
538
-
as the crawler config contains a key that is used to manage the Algolia account. If you need to modify the crawler configuration log in to crawler.algolia.com and edit the configuration in the
539
-
UI. Once the updated configuration is tested, update the configuration stored in the docs-private repo.
540
-
541
-
**Note**
542
-
543
-
Comments added to the config get removed by the Algolia editor :( The best practice would be to add your comments to the PR used to update the config in docs-private.
544
-
545
-
### Doc search tweaks {#doc-search-tweaks}
546
-
We use [Docsearch](https://docsearch.algolia.com/) from Algolia; there is not much for you to do to have the docs you write added to the search. Every Monday, the Algolia crawler updates our index.
547
-
548
-
If a search is not finding the page that you expect, then have a look at the Markdown for that page. For example, a search for `UDF` was returning a bunch of changelog entries, but not the page specifically for user defined functions. This was the Markdown for the page:
549
-
550
-
```md
551
-
---
552
-
slug: /sql-reference/statements/create/function
553
-
sidebar_position: 38
554
-
sidebar_label: FUNCTION
555
-
---
556
-
557
-
# CREATE FUNCTION
558
-
559
-
Creates a user defined function from a lambda expression.
560
-
```
561
-
562
-
And this was the change to improve the search results (add the expected search terms to the H1 heading):
563
-
564
-
```md
565
-
---
566
-
slug: /sql-reference/statements/create/function
567
-
sidebar_position: 38
568
-
sidebar_label: FUNCTION
569
-
---
570
-
571
-
# CREATE FUNCTION — user defined function (UDF)
572
-
573
-
Creates a user defined function from a lambda expression.
574
-
```
575
-
576
-
Note: The docs are crawled each morning. If you make a change and want the docs re-crawled sooner, open an issue in clickhouse-docs.
446
+
The docs are crawled daily. This is achieved by parsing the markdown and inserting it into Algolia. We maintain a list of authoritative search results to measure relevancy. See [Search README](../scripts/search/README.md) for further details.
577
447
578
448
## Tools that you might like {#tools-that-you-might-like}
The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the `clusterAllReplicas` function. See [here](/operations/system-tables/overview#system-tables-in-clickhouse-cloud) for further details.
Copy file name to clipboardExpand all lines: docs/best-practices/_snippets/_bulk_inserts.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,4 +8,4 @@ If you're unable to batch data client-side, ClickHouse supports asynchronous ins
8
8
9
9
:::tip
10
10
Regardless of the size of your inserts, we recommend keeping the number of insert queries around one insert query per second. The reason for that recommendation is that the created parts are merged to larger parts in the background (in order to optimize your data for read queries), and sending too many insert queries per second can lead to situations where the background merging can't keep up with the number of new parts. However, you can use a higher rate of insert queries per second when you use asynchronous inserts (see asynchronous inserts).
Copy file name to clipboardExpand all lines: docs/best-practices/minimize_optimize_joins.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -66,4 +66,4 @@ For optimal performance:
66
66
* Avoid more than 3–4 joins per query.
67
67
* Benchmark different algorithms on real data - performance varies based on JOIN key distribution and data size.
68
68
69
-
For more on JOIN optimization strategies, JOIN algorithms, and how to tune them, refer to the[ ClickHouse documentation](/guides/joining-tables) and this [blog series](https://clickhouse.com/blog/clickhouse-fully-supports-joins-part1).
69
+
For more on JOIN optimization strategies, JOIN algorithms, and how to tune them, refer to the[ ClickHouse documentation](/guides/joining-tables) and this [blog series](https://clickhouse.com/blog/clickhouse-fully-supports-joins-part1).
0 commit comments