Skip to content

Commit e4fee7f

Browse files
authored
update rest api docs, fix links (#1074)
* update rest api docs fix links rename index name to index id * fix headings * fix gh link in quickwit config * fix query language link * fix caution block
1 parent d9c4fda commit e4fee7f

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

docs/reference/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ quickwit index search
213213

214214
`--index` ID of the target index.
215215
`--config` Quickwit config file.
216-
`--query` Query expressed in natural query language (barack AND obama) OR "president of united states"). Learn more on https://quickwit.io/docs/reference/search-language.
216+
`--query` Query expressed in natural query language (barack AND obama) OR "president of united states"). Learn more on [query language](./query-language)
217217
`--max-hits` Maximum number of hits returned. (Default: 20)
218218
`--start-offset` Offset in the global result set of the first hit returned. (Default: 0)
219219
`--search-fields` List of fields that Quickwit will search into if the user query does not explicitly target a field in the query. It overrides the default search fields defined in the index config. Space-separated list, e.g. "field1 field2".

docs/reference/index-config.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ The `index-uri` parameter is optional.
7474
By default, the `index-uri` will be computed by concatenating the `index-id` with the
7575
`default_index_root_uri` defined in the [Quickwit's config](quickwit-config).
7676

77-
<aside>
78-
⚠️ The file storage will not work when running quickwit in distributed mode.
77+
78+
:::caution
79+
The file storage will not work when running quickwit in distributed mode.
7980
Today, only the s3 storage is available when running several searcher nodes.
80-
</aside>
81+
:::
82+
8183

8284
## Doc mapping
8385

docs/reference/quickwit-config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This page documents the Quickwit configuration properties. It is divided into th
99
- Indexer properties: defined in `[indexer]` section of the configuration file.
1010
- Searcher properties: defined in `[searcher]` section of the configuration file.
1111

12-
A commented example is accessible here: [quickwit.yaml]([link](https://github.com/quickwit-inc/quickwit/blob/main/config/quickwit.yaml)).
12+
A commented example is accessible here: [quickwit.yaml](https://github.com/quickwit-inc/quickwit/blob/d9c4fda658baa3bd7291f8abdff8c4b4b56c232f/config/quickwit.yaml).
1313

1414
## Common configuration
1515

@@ -42,4 +42,4 @@ This section contains the configuration options for a Searcher.
4242
| --- | --- | --- |
4343
| fast_field_cache_capacity | Fast field cache capacity on a Searcher. | 10G |
4444
| split_footer_cache_capacity | Split footer cache (it is essentially the hotcache) capacity on a Searcher. | 1G |
45-
| max_num_concurrent_split_streams | Maximum number of concurrent split stream requests running on a Searcher. | 100 |
45+
| max_num_concurrent_split_streams | Maximum number of concurrent split stream requests running on a Searcher. | 100 |

docs/reference/rest-api.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ All the API endpoints start with the `api/v1/` prefix. `v1` indicates that we ar
1313
The API uses **JSON** encoded as **UTF-8**. The body of POST and PUT requests must be a JSON object and their `Content-Type` header should be set to `application/json; charset=UTF-8`.
1414

1515
The response for the /search endpoint is always a JSON object, and the content type is always `application/json; charset=UTF-8.`
16-
The response for the /search/stream endpoint is a HTTP stream. Depending on the client capability it is a HTTP1.1 (chunked transfer encoded stream)[https://en.wikipedia.org/wiki/Chunked_transfer_encoding] or a HTTP2 stream.
16+
The response for the /search/stream endpoint is a HTTP stream. Depending on the client capability it is a HTTP1.1 [chunked transfer encoded stream](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) or a HTTP2 stream.
1717

18-
## Parameters
18+
### Parameters
1919

2020
Parameters passed in the URL must be properly URL-encoded, using the UTF-8 encoding for non-ASCII characters.
2121

2222
```
2323
GET [..]/search?query=barack%20obama
2424
```
2525

26-
## Error handling
26+
### Error handling
2727

2828
Successful requests return a 2xx HTTP status code.
2929

@@ -40,16 +40,16 @@ Failed requests return a 4xx HTTP status code. The response body of failed reque
4040
### Search in an index
4141

4242
```
43-
GET api/v1/indexes/<index name>/search
43+
GET api/v1/indexes/<index id>/search
4444
```
4545

46-
Search for documents matching a query in the given index `<index name>`.
46+
Search for documents matching a query in the given index `<index id>`.
4747

4848
#### Path variable
4949

5050
| Variable | Description |
5151
| ------------- | ------------- |
52-
| **index name** | The index name |
52+
| **index id** | The index id |
5353

5454

5555
#### Get parameters
@@ -65,7 +65,7 @@ Search for documents matching a query in the given index `<index name>`.
6565
| **format** | `Enum` | The output format. Allowed values are "json" or "prettyjson" | `prettyjson` |
6666

6767

68-
### Response
68+
#### Response
6969

7070
| Field | Description | Type |
7171
| -------------------- | ------------------------------ | :--------: |
@@ -76,10 +76,10 @@ Search for documents matching a query in the given index `<index name>`.
7676
### Search stream in an index
7777

7878
```
79-
GET api/v1/indexes/<index name>/search/stream
79+
GET api/v1/indexes/<index id>/search/stream
8080
```
8181

82-
Streams field values from ALL documents matching a search query in the given index `<index name>`, in a specified output format among the following:
82+
Streams field values from ALL documents matching a search query in the given index `<index id>`, in a specified output format among the following:
8383
- [CSV](https://datatracker.ietf.org/doc/html/rfc4180)
8484
- [ClickHouse RowBinary](https://clickhouse.tech/docs/en/interfaces/formats/#rowbinary)
8585

@@ -94,7 +94,7 @@ The endpoint will return 10 million values if 10 million documents match the que
9494

9595
| Variable | Description |
9696
| ------------- | ------------- |
97-
| **index name** | The index name |
97+
| **index id** | The index id |
9898

9999

100100
#### Get parameters
@@ -109,11 +109,11 @@ The endpoint will return 10 million values if 10 million documents match the que
109109
| **outputFormat** | `String` | Response output format. `csv` or `clickHouseRowBinary` | `csv` |
110110

111111

112-
### Response
113-
The response is an HTTP stream. Depending on the client's capability, it is an HTTP1.1 (chunked transfer encoded stream)[https://en.wikipedia.org/wiki/Chunked_transfer_encoding] or an HTTP2 stream.
112+
#### Response
113+
The response is an HTTP stream. Depending on the client's capability, it is an HTTP1.1 [chunked transfer encoded stream](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) or an HTTP2 stream.
114114

115115
It returns a list of all the field values from documents matching the query. The field must be marked as "fast" in the index config for this to work.
116116
The formatting is based on the specified output format.
117117

118-
On error, an "X-Stream-Error" header will be sent via the trailers channel with information about the error, and the stream will be closed via (`sender.abort()`)[https://docs.rs/hyper/latest/hyper/body/struct.Sender.html#method.abort].
118+
On error, an "X-Stream-Error" header will be sent via the trailers channel with information about the error, and the stream will be closed via [`sender.abort()`](https://docs.rs/hyper/0.14.16/hyper/body/struct.Sender.html#method.abort).
119119
Depending on the client, the trailer header with error details may not be shown. The error will also be logged in quickwit ("Error when streaming search results").

0 commit comments

Comments
 (0)