Skip to content

Commit 04f1e7a

Browse files
committed
Remove search stream endpoint
1 parent 340a365 commit 04f1e7a

File tree

26 files changed

+23
-3244
lines changed

26 files changed

+23
-3244
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9191
- Remove support for 2-digit years in java datetime parser (#5596)
9292
- Remove DocMapper trait (#5508)
9393
- Remove support for AWS Lambda (#5884)
94-
94+
- Remove search stream endpoint (#5886)
9595

9696
# [0.8.1]
9797

docs/configuration/node-config.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,10 @@ This section contains the configuration options for a Searcher.
198198
| --- | --- | --- |
199199
| `aggregation_memory_limit` | Controls the maximum amount of memory that can be used for aggregations before aborting. This limit is per searcher node. A node may run concurrent queries, which share the limit. The first query that will hit the limit will be aborted and frees its memory. It is used to prevent excessive memory usage during the aggregation phase, which can lead to performance degradation or crashes. | `500M`|
200200
| `aggregation_bucket_limit` | Determines the maximum number of buckets returned to the client. | `65000` |
201-
| `fast_field_cache_capacity` | Fast field in memory cache capacity on a Searcher. If your filter by dates, run aggregations, range queries, or if you use the search stream API, or even for tracing, it might worth increasing this parameter. The [metrics](../reference/metrics.md) starting by `quickwit_cache_fastfields_cache` can help you make an informed choice when setting this value. | `1G` |
201+
| `fast_field_cache_capacity` | Fast field in memory cache capacity on a Searcher. If your filter by dates, run aggregations, range queries, or even for tracing, it might worth increasing this parameter. The [metrics](../reference/metrics.md) starting by `quickwit_cache_fastfields_cache` can help you make an informed choice when setting this value. | `1G` |
202202
| `split_footer_cache_capacity` | Split footer in memory cache (it is essentially the hotcache) capacity on a Searcher.| `500M` |
203203
| `partial_request_cache_capacity` | Partial request in memory cache capacity on a Searcher. Cache intermediate state for a request, possibly making subsequent requests faster. It can be disabled by setting the size to `0`. | `64M` |
204204
| `max_num_concurrent_split_searches` | Maximum number of concurrent split search requests running on a Searcher. | `100` |
205-
| `max_num_concurrent_split_streams` | Maximum number of concurrent split stream requests running on a Searcher. | `100` |
206205
| `split_cache` | Searcher split cache configuration options defined in the section below. Cache disabled if unspecified. | |
207206
| `request_timeout_secs` | The time before a search request is cancelled. This should match the timeout of the stack calling into quickwit if there is one set. | `30` |
208207

docs/guides/add-full-text-search-to-your-olap-db.md

Lines changed: 0 additions & 254 deletions
This file was deleted.

docs/overview/introduction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Check out our guides to see how you can use Quickwit:
2727

2828
- [Log management](../log-management/overview.md)
2929
- [Distributed Tracing](../distributed-tracing/overview.md)
30-
- Adding full-text search capabilities to [OLAP databases such as ClickHouse](../guides/add-full-text-search-to-your-olap-db).
3130

3231

3332
## Key features

docs/reference/rest-api.md

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -113,61 +113,6 @@ GET api/v1/stackoverflow*/search
113113
}
114114
```
115115

116-
### Search stream in an index
117-
118-
```
119-
GET api/v1/<index id>/search/stream?query=searchterm&fast_field=my_id
120-
```
121-
122-
Streams field values from ALL documents matching a search query in the target index `<index id>`, in a specified output format among the following:
123-
124-
- [CSV](https://datatracker.ietf.org/doc/html/rfc4180)
125-
- [ClickHouse RowBinary](https://clickhouse.tech/docs/en/interfaces/formats/#rowbinary). If `partition_by_field` is set, Quickwit returns chunks of data for each partition field value. Each chunk starts with 16 bytes being partition value and content length and then the `fast_field` values in `RowBinary` format.
126-
127-
`fast_field` and `partition_by_field` must be fast fields of type `i64` or `u64`.
128-
129-
This endpoint is available as long as you have at least one node running a searcher service in the cluster.
130-
131-
132-
133-
:::note
134-
135-
The endpoint will return 10 million values if 10 million documents match the query. This is expected, this endpoint is made to support queries matching millions of documents and return field values in a reasonable response time.
136-
137-
:::
138-
139-
#### Path variable
140-
141-
| Variable | Description |
142-
| ------------- | ------------- |
143-
| `index id` | The index id |
144-
145-
#### Get parameters
146-
147-
| Variable | Type | Description | Default value |
148-
|---------------------|------------|----------------------------------------------------------------------------------------------------------|----------------------------------------------------|
149-
| `query` | `String` | Query text. See the [query language doc](query-language.md) | _required_ |
150-
| `fast_field` | `String` | Name of a field to retrieve from documents. This field must be a fast field of type `i64` or `u64`. | _required_ |
151-
| `search_field` | `[String]` | Fields to search on. Comma-separated list, e.g. "field1,field2" | index_config.search_settings.default_search_fields |
152-
| `start_timestamp` | `i64` | If set, restrict search to documents with a `timestamp >= start_timestamp`. The value must be in seconds. | |
153-
| `end_timestamp` | `i64` | If set, restrict search to documents with a `timestamp < end_timestamp`. The value must be in seconds. | |
154-
| `partition_by_field` | `String` | If set, the endpoint returns chunks of data for each partition field value. This field must be a fast field of type `i64` or `u64`. | |
155-
| `output_format` | `String` | Response output format. `csv` or `clickHouseRowBinary` | `csv` |
156-
157-
:::info
158-
The `start_timestamp` and `end_timestamp` should be specified in seconds regardless of the timestamp field precision.
159-
:::
160-
161-
#### Response
162-
163-
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.
164-
165-
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.
166-
The formatting is based on the specified output format.
167-
168-
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).
169-
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").
170-
171116
## Ingest API
172117

173118
### Ingest data into an index

quickwit/quickwit-config/src/node_config/mod.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ pub struct SearcherConfig {
268268
pub split_footer_cache_capacity: ByteSize,
269269
pub partial_request_cache_capacity: ByteSize,
270270
pub max_num_concurrent_split_searches: usize,
271-
pub max_num_concurrent_split_streams: usize,
271+
// Deprecated: stream search requests are no longer supported.
272+
#[serde(alias = "max_num_concurrent_split_streams", default, skip_serializing)]
273+
pub _max_num_concurrent_split_streams: Option<serde::de::IgnoredAny>,
272274
// Strangely, if None, this will also have the effect of not forwarding
273275
// to searcher.
274276
// TODO document and fix if necessary.
@@ -322,8 +324,8 @@ impl Default for SearcherConfig {
322324
fast_field_cache_capacity: ByteSize::gb(1),
323325
split_footer_cache_capacity: ByteSize::mb(500),
324326
partial_request_cache_capacity: ByteSize::mb(64),
325-
max_num_concurrent_split_streams: 100,
326327
max_num_concurrent_split_searches: 100,
328+
_max_num_concurrent_split_streams: None,
327329
aggregation_memory_limit: ByteSize::mb(500),
328330
aggregation_bucket_limit: 65000,
329331
split_cache: None,
@@ -355,16 +357,6 @@ impl SearcherConfig {
355357
split_cache_limits.max_file_descriptors
356358
);
357359
}
358-
if self.max_num_concurrent_split_streams
359-
> split_cache_limits.max_file_descriptors.get() as usize
360-
{
361-
anyhow::bail!(
362-
"max_num_concurrent_split_streams ({}) must be lower or equal to \
363-
split_cache.max_file_descriptors ({})",
364-
self.max_num_concurrent_split_streams,
365-
split_cache_limits.max_file_descriptors
366-
);
367-
}
368360
if self.warmup_single_split_initial_allocation > self.warmup_memory_budget {
369361
anyhow::bail!(
370362
"warmup_single_split_initial_allocation ({}) must be lower or equal to \

quickwit/quickwit-config/src/node_config/serialize.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ mod tests {
662662
split_footer_cache_capacity: ByteSize::gb(1),
663663
partial_request_cache_capacity: ByteSize::mb(64),
664664
max_num_concurrent_split_searches: 150,
665-
max_num_concurrent_split_streams: 120,
665+
_max_num_concurrent_split_streams: None,
666666
split_cache: None,
667667
request_timeout_secs: NonZeroU64::new(30).unwrap(),
668668
storage_timeout_policy: Some(crate::StorageTimeoutPolicy {

0 commit comments

Comments
 (0)