Skip to content

Commit 48278a7

Browse files
lizozomlukasolsonelasticmachine
authored
[Search service] Refactor the way server-side search strategies are registered (#68452) (#69331)
* [search] Refactor the way search strategies are registered/retrieved on the server * Fix types and tests and update docs * Fix failing test * Fix build of example plugin * Fix functional test * Make server strategies sync Co-authored-by: Liza K <liza.katz@elastic.co> Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent fea77cd commit 48278a7

File tree

52 files changed

+552
-741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+552
-741
lines changed

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.irequesttypesmap.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## IRequestTypesMap interface
66

7+
The map of search strategy IDs to the corresponding request type definitions.
8+
79
<b>Signature:</b>
810

911
```typescript

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.iresponsetypesmap.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## IResponseTypesMap interface
66

7+
The map of search strategy IDs to the corresponding response type definitions.
8+
79
<b>Signature:</b>
810

911
```typescript

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
export declare type ISearch<T extends TStrategyTypes> = (request: IRequestTypesMap[T], options?: ISearchOptions) => Promise<IResponseTypesMap[T]>;
10+
export declare type ISearch<T extends TStrategyTypes> = (context: RequestHandlerContext, request: IRequestTypesMap[T], options?: ISearchOptions) => Promise<IResponseTypesMap[T]>;
1111
```

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchcancel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
export declare type ISearchCancel<T extends TStrategyTypes> = (id: string) => Promise<void>;
10+
export declare type ISearchCancel<T extends TStrategyTypes> = (context: RequestHandlerContext, id: string) => Promise<void>;
1111
```

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchcontext.config_.md

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

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchcontext.core.md

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

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchcontext.md

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

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchoptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ export interface ISearchOptions
1414

1515
| Property | Type | Description |
1616
| --- | --- | --- |
17-
| [signal](./kibana-plugin-plugins-data-server.isearchoptions.signal.md) | <code>AbortSignal</code> | |
17+
| [signal](./kibana-plugin-plugins-data-server.isearchoptions.signal.md) | <code>AbortSignal</code> | An <code>AbortSignal</code> that allows the caller of <code>search</code> to abort a search request. |
1818

docs/development/plugins/data/server/kibana-plugin-plugins-data-server.isearchoptions.signal.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## ISearchOptions.signal property
66

7+
An `AbortSignal` that allows the caller of `search` to abort a search request.
8+
79
<b>Signature:</b>
810

911
```typescript
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ISearchSetup](./kibana-plugin-plugins-data-server.isearchsetup.md)
4+
5+
## ISearchSetup interface
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
export interface ISearchSetup
11+
```
12+
13+
## Properties
14+
15+
| Property | Type | Description |
16+
| --- | --- | --- |
17+
| [registerSearchStrategy](./kibana-plugin-plugins-data-server.isearchsetup.registersearchstrategy.md) | <code>TRegisterSearchStrategy</code> | Extension point exposed for other plugins to register their own search strategies. |
18+

0 commit comments

Comments
 (0)