Skip to content

Commit

Permalink
[Partial Results] Move other bucket into Search Source (#96384) (#97397)
Browse files Browse the repository at this point in the history
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* code review

* Add functional test for other bucket in search example app

* test

* test

* ts

* test

* test

* ts

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Liza Katz <[email protected]>
  • Loading branch information
kibanamachine and lizozom authored Apr 18, 2021
1 parent 884e931 commit 031750d
Show file tree
Hide file tree
Showing 38 changed files with 964 additions and 423 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) &gt; [hierarchical](./kibana-plugin-plugins-data-public.aggconfigs.hierarchical.md)

## AggConfigs.hierarchical property

<b>Signature:</b>

```typescript
hierarchical?: boolean;
```
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export declare class AggConfigs
| --- | --- | --- | --- |
| [aggs](./kibana-plugin-plugins-data-public.aggconfigs.aggs.md) | | <code>IAggConfig[]</code> | |
| [createAggConfig](./kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md) | | <code>&lt;T extends AggConfig = AggConfig&gt;(params: CreateAggConfigParams, { addToAggConfigs }?: {</code><br/><code> addToAggConfigs?: boolean &#124; undefined;</code><br/><code> }) =&gt; T</code> | |
| [hierarchical](./kibana-plugin-plugins-data-public.aggconfigs.hierarchical.md) | | <code>boolean</code> | |
| [indexPattern](./kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md) | | <code>IndexPattern</code> | |
| [timeFields](./kibana-plugin-plugins-data-public.aggconfigs.timefields.md) | | <code>string[]</code> | |
| [timeRange](./kibana-plugin-plugins-data-public.aggconfigs.timerange.md) | | <code>TimeRange</code> | |
Expand All @@ -46,5 +47,5 @@ export declare class AggConfigs
| [onSearchRequestStart(searchSource, options)](./kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md) | | |
| [setTimeFields(timeFields)](./kibana-plugin-plugins-data-public.aggconfigs.settimefields.md) | | |
| [setTimeRange(timeRange)](./kibana-plugin-plugins-data-public.aggconfigs.settimerange.md) | | |
| [toDsl(hierarchical)](./kibana-plugin-plugins-data-public.aggconfigs.todsl.md) | | |
| [toDsl()](./kibana-plugin-plugins-data-public.aggconfigs.todsl.md) | | |

Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@
<b>Signature:</b>

```typescript
toDsl(hierarchical?: boolean): Record<string, any>;
toDsl(): Record<string, any>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| hierarchical | <code>boolean</code> | |

<b>Returns:</b>

`Record<string, any>`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ISearchOptions](./kibana-plugin-plugins-data-public.isearchoptions.md) &gt; [requestResponder](./kibana-plugin-plugins-data-public.isearchoptions.requestresponder.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) &gt; [ISearchOptions](./kibana-plugin-plugins-data-public.isearchoptions.md) &gt; [inspector](./kibana-plugin-plugins-data-public.isearchoptions.inspector.md)

## ISearchOptions.requestResponder property
## ISearchOptions.inspector property

Inspector integration options

<b>Signature:</b>

```typescript
requestResponder?: RequestResponder;
inspector?: IInspectorInfo;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export interface ISearchOptions
| --- | --- | --- |
| [abortSignal](./kibana-plugin-plugins-data-public.isearchoptions.abortsignal.md) | <code>AbortSignal</code> | An <code>AbortSignal</code> that allows the caller of <code>search</code> to abort a search request. |
| [indexPattern](./kibana-plugin-plugins-data-public.isearchoptions.indexpattern.md) | <code>IndexPattern</code> | Index pattern reference is used for better error messages |
| [inspector](./kibana-plugin-plugins-data-public.isearchoptions.inspector.md) | <code>IInspectorInfo</code> | Inspector integration options |
| [isRestore](./kibana-plugin-plugins-data-public.isearchoptions.isrestore.md) | <code>boolean</code> | Whether the session is restored (i.e. search requests should re-use the stored search IDs, rather than starting from scratch) |
| [isStored](./kibana-plugin-plugins-data-public.isearchoptions.isstored.md) | <code>boolean</code> | Whether the session is already saved (i.e. sent to background) |
| [legacyHitsTotal](./kibana-plugin-plugins-data-public.isearchoptions.legacyhitstotal.md) | <code>boolean</code> | Request the legacy format for the total number of hits. If sending <code>rest_total_hits_as_int</code> to something other than <code>true</code>, this should be set to <code>false</code>. |
| [requestResponder](./kibana-plugin-plugins-data-public.isearchoptions.requestresponder.md) | <code>RequestResponder</code> | |
| [sessionId](./kibana-plugin-plugins-data-public.isearchoptions.sessionid.md) | <code>string</code> | A session ID, grouping multiple search requests into a single session. |
| [strategy](./kibana-plugin-plugins-data-public.isearchoptions.strategy.md) | <code>string</code> | Use this option to force using a specific server side search strategy. Leave empty to use the default strategy. |

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Fetch this source and reject the returned Promise on error
<b>Signature:</b>

```typescript
fetch(options?: ISearchOptions): Promise<import("@elastic/elasticsearch/api/types").SearchResponse<any>>;
fetch(options?: ISearchOptions): Promise<estypes.SearchResponse<any>>;
```

## Parameters
Expand All @@ -25,5 +25,5 @@ fetch(options?: ISearchOptions): Promise<import("@elastic/elasticsearch/api/type

<b>Returns:</b>

`Promise<import("@elastic/elasticsearch/api/types").SearchResponse<any>>`
`Promise<estypes.SearchResponse<any>>`

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Fetch this source from Elasticsearch, returning an observable over the response(
<b>Signature:</b>

```typescript
fetch$(options?: ISearchOptions): import("rxjs").Observable<import("@elastic/elasticsearch/api/types").SearchResponse<any>>;
fetch$(options?: ISearchOptions): Observable<estypes.SearchResponse<any>>;
```

## Parameters
Expand All @@ -20,5 +20,5 @@ fetch$(options?: ISearchOptions): import("rxjs").Observable<import("@elastic/ela

<b>Returns:</b>

`import("rxjs").Observable<import("@elastic/elasticsearch/api/types").SearchResponse<any>>`
`Observable<estypes.SearchResponse<any>>`

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
<b>Signature:</b>

```typescript
aggs?: any;
aggs?: object | IAggConfigs | (() => object);
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface SearchSourceFields

| Property | Type | Description |
| --- | --- | --- |
| [aggs](./kibana-plugin-plugins-data-public.searchsourcefields.aggs.md) | <code>any</code> | [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) |
| [aggs](./kibana-plugin-plugins-data-public.searchsourcefields.aggs.md) | <code>object &#124; IAggConfigs &#124; (() =&gt; object)</code> | [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) |
| [fields](./kibana-plugin-plugins-data-public.searchsourcefields.fields.md) | <code>SearchFieldValue[]</code> | Retrieve fields via the search Fields API |
| [fieldsFromSource](./kibana-plugin-plugins-data-public.searchsourcefields.fieldsfromsource.md) | <code>NameList</code> | Retreive fields directly from \_source (legacy behavior) |
| [filter](./kibana-plugin-plugins-data-public.searchsourcefields.filter.md) | <code>Filter[] &#124; Filter &#124; (() =&gt; Filter[] &#124; Filter &#124; undefined)</code> | [Filter](./kibana-plugin-plugins-data-public.filter.md) |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ISearchOptions](./kibana-plugin-plugins-data-server.isearchoptions.md) &gt; [requestResponder](./kibana-plugin-plugins-data-server.isearchoptions.requestresponder.md)
[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [ISearchOptions](./kibana-plugin-plugins-data-server.isearchoptions.md) &gt; [inspector](./kibana-plugin-plugins-data-server.isearchoptions.inspector.md)

## ISearchOptions.requestResponder property
## ISearchOptions.inspector property

Inspector integration options

<b>Signature:</b>

```typescript
requestResponder?: RequestResponder;
inspector?: IInspectorInfo;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export interface ISearchOptions
| --- | --- | --- |
| [abortSignal](./kibana-plugin-plugins-data-server.isearchoptions.abortsignal.md) | <code>AbortSignal</code> | An <code>AbortSignal</code> that allows the caller of <code>search</code> to abort a search request. |
| [indexPattern](./kibana-plugin-plugins-data-server.isearchoptions.indexpattern.md) | <code>IndexPattern</code> | Index pattern reference is used for better error messages |
| [inspector](./kibana-plugin-plugins-data-server.isearchoptions.inspector.md) | <code>IInspectorInfo</code> | Inspector integration options |
| [isRestore](./kibana-plugin-plugins-data-server.isearchoptions.isrestore.md) | <code>boolean</code> | Whether the session is restored (i.e. search requests should re-use the stored search IDs, rather than starting from scratch) |
| [isStored](./kibana-plugin-plugins-data-server.isearchoptions.isstored.md) | <code>boolean</code> | Whether the session is already saved (i.e. sent to background) |
| [legacyHitsTotal](./kibana-plugin-plugins-data-server.isearchoptions.legacyhitstotal.md) | <code>boolean</code> | Request the legacy format for the total number of hits. If sending <code>rest_total_hits_as_int</code> to something other than <code>true</code>, this should be set to <code>false</code>. |
| [requestResponder](./kibana-plugin-plugins-data-server.isearchoptions.requestresponder.md) | <code>RequestResponder</code> | |
| [sessionId](./kibana-plugin-plugins-data-server.isearchoptions.sessionid.md) | <code>string</code> | A session ID, grouping multiple search requests into a single session. |
| [strategy](./kibana-plugin-plugins-data-server.isearchoptions.strategy.md) | <code>string</code> | Use this option to force using a specific server side search strategy. Leave empty to use the default strategy. |

6 changes: 6 additions & 0 deletions examples/search_examples/public/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import '@elastic/eui/src/global_styling/variables/header';

.searchExampleStepDsc {
padding-left: $euiSizeXL;
font-style: italic;
}
Loading

0 comments on commit 031750d

Please sign in to comment.