diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig._constructor_.md
new file mode 100644
index 0000000000000..9287a08ff196b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig._constructor_.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [(constructor)](./kibana-plugin-plugins-data-public.aggconfig._constructor_.md)
+
+## AggConfig.(constructor)
+
+Constructs a new instance of the `AggConfig` class
+
+Signature:
+
+```typescript
+constructor(aggConfigs: IAggConfigs, opts: AggConfigOptions);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| aggConfigs | IAggConfigs
| |
+| opts | AggConfigOptions
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.aggconfigs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.aggconfigs.md
new file mode 100644
index 0000000000000..f552bbd2d1cfc
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.aggconfigs.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [aggConfigs](./kibana-plugin-plugins-data-public.aggconfig.aggconfigs.md)
+
+## AggConfig.aggConfigs property
+
+Signature:
+
+```typescript
+aggConfigs: IAggConfigs;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.brandnew.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.brandnew.md
new file mode 100644
index 0000000000000..eb1f3af4c5b01
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.brandnew.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [brandNew](./kibana-plugin-plugins-data-public.aggconfig.brandnew.md)
+
+## AggConfig.brandNew property
+
+Signature:
+
+```typescript
+brandNew?: boolean;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.createfilter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.createfilter.md
new file mode 100644
index 0000000000000..7ec0350f65321
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.createfilter.md
@@ -0,0 +1,23 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [createFilter](./kibana-plugin-plugins-data-public.aggconfig.createfilter.md)
+
+## AggConfig.createFilter() method
+
+Signature:
+
+```typescript
+createFilter(key: string, params?: {}): any;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| key | string
| |
+| params | {}
| |
+
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.enabled.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.enabled.md
new file mode 100644
index 0000000000000..82595ee5f5b63
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.enabled.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [enabled](./kibana-plugin-plugins-data-public.aggconfig.enabled.md)
+
+## AggConfig.enabled property
+
+Signature:
+
+```typescript
+enabled: boolean;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.ensureids.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.ensureids.md
new file mode 100644
index 0000000000000..04e0b82187a5f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.ensureids.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [ensureIds](./kibana-plugin-plugins-data-public.aggconfig.ensureids.md)
+
+## AggConfig.ensureIds() method
+
+Ensure that all of the objects in the list have ids, the objects and list are modified by reference.
+
+Signature:
+
+```typescript
+static ensureIds(list: any[]): any[];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| list | any[]
| |
+
+Returns:
+
+`any[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.fieldistimefield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.fieldistimefield.md
new file mode 100644
index 0000000000000..a1fde4dec25b1
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.fieldistimefield.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [fieldIsTimeField](./kibana-plugin-plugins-data-public.aggconfig.fieldistimefield.md)
+
+## AggConfig.fieldIsTimeField() method
+
+Signature:
+
+```typescript
+fieldIsTimeField(): boolean | "" | undefined;
+```
+Returns:
+
+`boolean | "" | undefined`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.fieldname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.fieldname.md
new file mode 100644
index 0000000000000..2d3acb7f026ff
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.fieldname.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [fieldName](./kibana-plugin-plugins-data-public.aggconfig.fieldname.md)
+
+## AggConfig.fieldName() method
+
+Signature:
+
+```typescript
+fieldName(): any;
+```
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getaggparams.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getaggparams.md
new file mode 100644
index 0000000000000..f898844ff0273
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getaggparams.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getAggParams](./kibana-plugin-plugins-data-public.aggconfig.getaggparams.md)
+
+## AggConfig.getAggParams() method
+
+Signature:
+
+```typescript
+getAggParams(): import("./param_types/agg").AggParamType[];
+```
+Returns:
+
+`import("./param_types/agg").AggParamType[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getfield.md
new file mode 100644
index 0000000000000..1fb6f88c43171
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getfield.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getField](./kibana-plugin-plugins-data-public.aggconfig.getfield.md)
+
+## AggConfig.getField() method
+
+Signature:
+
+```typescript
+getField(): any;
+```
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getfielddisplayname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getfielddisplayname.md
new file mode 100644
index 0000000000000..710499cee62dd
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getfielddisplayname.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getFieldDisplayName](./kibana-plugin-plugins-data-public.aggconfig.getfielddisplayname.md)
+
+## AggConfig.getFieldDisplayName() method
+
+Signature:
+
+```typescript
+getFieldDisplayName(): any;
+```
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getindexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getindexpattern.md
new file mode 100644
index 0000000000000..ed0e9d0fbb5de
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getindexpattern.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getIndexPattern](./kibana-plugin-plugins-data-public.aggconfig.getindexpattern.md)
+
+## AggConfig.getIndexPattern() method
+
+Signature:
+
+```typescript
+getIndexPattern(): import("../../../public").IndexPattern;
+```
+Returns:
+
+`import("../../../public").IndexPattern`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getkey.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getkey.md
new file mode 100644
index 0000000000000..a2a59fcf9ae31
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getkey.md
@@ -0,0 +1,23 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getKey](./kibana-plugin-plugins-data-public.aggconfig.getkey.md)
+
+## AggConfig.getKey() method
+
+Signature:
+
+```typescript
+getKey(bucket: any, key?: string): any;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| bucket | any
| |
+| key | string
| |
+
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getparam.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getparam.md
new file mode 100644
index 0000000000000..ad4cd2fa175f8
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getparam.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getParam](./kibana-plugin-plugins-data-public.aggconfig.getparam.md)
+
+## AggConfig.getParam() method
+
+Signature:
+
+```typescript
+getParam(key: string): any;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| key | string
| |
+
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getrequestaggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getrequestaggs.md
new file mode 100644
index 0000000000000..773c2f5a7c0e9
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getrequestaggs.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getRequestAggs](./kibana-plugin-plugins-data-public.aggconfig.getrequestaggs.md)
+
+## AggConfig.getRequestAggs() method
+
+Signature:
+
+```typescript
+getRequestAggs(): AggConfig[];
+```
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getresponseaggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getresponseaggs.md
new file mode 100644
index 0000000000000..cf515e68dcc57
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getresponseaggs.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getResponseAggs](./kibana-plugin-plugins-data-public.aggconfig.getresponseaggs.md)
+
+## AggConfig.getResponseAggs() method
+
+Signature:
+
+```typescript
+getResponseAggs(): AggConfig[];
+```
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimerange.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimerange.md
new file mode 100644
index 0000000000000..897a6d8dda3f1
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimerange.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getTimeRange](./kibana-plugin-plugins-data-public.aggconfig.gettimerange.md)
+
+## AggConfig.getTimeRange() method
+
+Signature:
+
+```typescript
+getTimeRange(): import("../../../public").TimeRange | undefined;
+```
+Returns:
+
+`import("../../../public").TimeRange | undefined`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getvalue.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getvalue.md
new file mode 100644
index 0000000000000..4fab1af3f6464
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.getvalue.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getValue](./kibana-plugin-plugins-data-public.aggconfig.getvalue.md)
+
+## AggConfig.getValue() method
+
+Signature:
+
+```typescript
+getValue(bucket: any): any;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| bucket | any
| |
+
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.id.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.id.md
new file mode 100644
index 0000000000000..1fa7a5c57e2a8
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.id.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [id](./kibana-plugin-plugins-data-public.aggconfig.id.md)
+
+## AggConfig.id property
+
+Signature:
+
+```typescript
+id: string;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.isfilterable.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.isfilterable.md
new file mode 100644
index 0000000000000..a795ab1e91c2c
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.isfilterable.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [isFilterable](./kibana-plugin-plugins-data-public.aggconfig.isfilterable.md)
+
+## AggConfig.isFilterable() method
+
+Signature:
+
+```typescript
+isFilterable(): boolean;
+```
+Returns:
+
+`boolean`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.makelabel.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.makelabel.md
new file mode 100644
index 0000000000000..65923ed0ae889
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.makelabel.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [makeLabel](./kibana-plugin-plugins-data-public.aggconfig.makelabel.md)
+
+## AggConfig.makeLabel() method
+
+Signature:
+
+```typescript
+makeLabel(percentageMode?: boolean): any;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| percentageMode | boolean
| |
+
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md
new file mode 100644
index 0000000000000..ceb90cffbf6ca
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.md
@@ -0,0 +1,62 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md)
+
+## AggConfig class
+
+Signature:
+
+```typescript
+export declare class AggConfig
+```
+
+## Constructors
+
+| Constructor | Modifiers | Description |
+| --- | --- | --- |
+| [(constructor)(aggConfigs, opts)](./kibana-plugin-plugins-data-public.aggconfig._constructor_.md) | | Constructs a new instance of the AggConfig
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [aggConfigs](./kibana-plugin-plugins-data-public.aggconfig.aggconfigs.md) | | IAggConfigs
| |
+| [brandNew](./kibana-plugin-plugins-data-public.aggconfig.brandnew.md) | | boolean
| |
+| [enabled](./kibana-plugin-plugins-data-public.aggconfig.enabled.md) | | boolean
| |
+| [id](./kibana-plugin-plugins-data-public.aggconfig.id.md) | | string
| |
+| [params](./kibana-plugin-plugins-data-public.aggconfig.params.md) | | any
| |
+| [parent](./kibana-plugin-plugins-data-public.aggconfig.parent.md) | | IAggConfigs
| |
+| [schema](./kibana-plugin-plugins-data-public.aggconfig.schema.md) | | string
| |
+| [type](./kibana-plugin-plugins-data-public.aggconfig.type.md) | | IAggType
| |
+
+## Methods
+
+| Method | Modifiers | Description |
+| --- | --- | --- |
+| [createFilter(key, params)](./kibana-plugin-plugins-data-public.aggconfig.createfilter.md) | | |
+| [ensureIds(list)](./kibana-plugin-plugins-data-public.aggconfig.ensureids.md) | static
| Ensure that all of the objects in the list have ids, the objects and list are modified by reference. |
+| [fieldIsTimeField()](./kibana-plugin-plugins-data-public.aggconfig.fieldistimefield.md) | | |
+| [fieldName()](./kibana-plugin-plugins-data-public.aggconfig.fieldname.md) | | |
+| [getAggParams()](./kibana-plugin-plugins-data-public.aggconfig.getaggparams.md) | | |
+| [getField()](./kibana-plugin-plugins-data-public.aggconfig.getfield.md) | | |
+| [getFieldDisplayName()](./kibana-plugin-plugins-data-public.aggconfig.getfielddisplayname.md) | | |
+| [getIndexPattern()](./kibana-plugin-plugins-data-public.aggconfig.getindexpattern.md) | | |
+| [getKey(bucket, key)](./kibana-plugin-plugins-data-public.aggconfig.getkey.md) | | |
+| [getParam(key)](./kibana-plugin-plugins-data-public.aggconfig.getparam.md) | | |
+| [getRequestAggs()](./kibana-plugin-plugins-data-public.aggconfig.getrequestaggs.md) | | |
+| [getResponseAggs()](./kibana-plugin-plugins-data-public.aggconfig.getresponseaggs.md) | | |
+| [getTimeRange()](./kibana-plugin-plugins-data-public.aggconfig.gettimerange.md) | | |
+| [getValue(bucket)](./kibana-plugin-plugins-data-public.aggconfig.getvalue.md) | | |
+| [isFilterable()](./kibana-plugin-plugins-data-public.aggconfig.isfilterable.md) | | |
+| [makeLabel(percentageMode)](./kibana-plugin-plugins-data-public.aggconfig.makelabel.md) | | |
+| [nextId(list)](./kibana-plugin-plugins-data-public.aggconfig.nextid.md) | static
| Calculate the next id based on the ids in this list {array} list - a list of objects with id properties |
+| [onSearchRequestStart(searchSource, options)](./kibana-plugin-plugins-data-public.aggconfig.onsearchrequeststart.md) | | Hook for pre-flight logic, see AggType\#onSearchRequestStart |
+| [serialize()](./kibana-plugin-plugins-data-public.aggconfig.serialize.md) | | |
+| [setParams(from)](./kibana-plugin-plugins-data-public.aggconfig.setparams.md) | | Write the current values to this.params, filling in the defaults as we go |
+| [setType(type)](./kibana-plugin-plugins-data-public.aggconfig.settype.md) | | |
+| [toDsl(aggConfigs)](./kibana-plugin-plugins-data-public.aggconfig.todsl.md) | | Convert this aggConfig to its dsl syntax.Adds params and adhoc subaggs to a pojo, then returns it |
+| [toExpressionAst()](./kibana-plugin-plugins-data-public.aggconfig.toexpressionast.md) | | |
+| [toJSON()](./kibana-plugin-plugins-data-public.aggconfig.tojson.md) | | |
+| [toSerializedFieldFormat()](./kibana-plugin-plugins-data-public.aggconfig.toserializedfieldformat.md) | | Returns a serialized field format for the field used in this agg. This can be passed to fieldFormats.deserialize to get the field format instance. |
+| [write(aggs)](./kibana-plugin-plugins-data-public.aggconfig.write.md) | | |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.nextid.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.nextid.md
new file mode 100644
index 0000000000000..ab524a6d1c4f1
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.nextid.md
@@ -0,0 +1,26 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [nextId](./kibana-plugin-plugins-data-public.aggconfig.nextid.md)
+
+## AggConfig.nextId() method
+
+Calculate the next id based on the ids in this list
+
+ {array} list - a list of objects with id properties
+
+Signature:
+
+```typescript
+static nextId(list: IAggConfig[]): number;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| list | IAggConfig[]
| |
+
+Returns:
+
+`number`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.onsearchrequeststart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.onsearchrequeststart.md
new file mode 100644
index 0000000000000..81df7866560e3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.onsearchrequeststart.md
@@ -0,0 +1,25 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [onSearchRequestStart](./kibana-plugin-plugins-data-public.aggconfig.onsearchrequeststart.md)
+
+## AggConfig.onSearchRequestStart() method
+
+Hook for pre-flight logic, see AggType\#onSearchRequestStart
+
+Signature:
+
+```typescript
+onSearchRequestStart(searchSource: ISearchSource, options?: ISearchOptions): Promise | Promise;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| searchSource | ISearchSource
| |
+| options | ISearchOptions
| |
+
+Returns:
+
+`Promise | Promise`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.params.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.params.md
new file mode 100644
index 0000000000000..5bdb67f53b519
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.params.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [params](./kibana-plugin-plugins-data-public.aggconfig.params.md)
+
+## AggConfig.params property
+
+Signature:
+
+```typescript
+params: any;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.parent.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.parent.md
new file mode 100644
index 0000000000000..53d028457a9ae
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.parent.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [parent](./kibana-plugin-plugins-data-public.aggconfig.parent.md)
+
+## AggConfig.parent property
+
+Signature:
+
+```typescript
+parent?: IAggConfigs;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.schema.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.schema.md
new file mode 100644
index 0000000000000..afbf685951356
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.schema.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [schema](./kibana-plugin-plugins-data-public.aggconfig.schema.md)
+
+## AggConfig.schema property
+
+Signature:
+
+```typescript
+schema?: string;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.serialize.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.serialize.md
new file mode 100644
index 0000000000000..b0eebdbcc11ec
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.serialize.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [serialize](./kibana-plugin-plugins-data-public.aggconfig.serialize.md)
+
+## AggConfig.serialize() method
+
+Signature:
+
+```typescript
+serialize(): AggConfigSerialized;
+```
+Returns:
+
+`AggConfigSerialized`
+
+Returns a serialized representation of an AggConfig.
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.setparams.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.setparams.md
new file mode 100644
index 0000000000000..cb495b7653f8a
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.setparams.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [setParams](./kibana-plugin-plugins-data-public.aggconfig.setparams.md)
+
+## AggConfig.setParams() method
+
+Write the current values to this.params, filling in the defaults as we go
+
+Signature:
+
+```typescript
+setParams(from: any): void;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| from | any
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.settype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.settype.md
new file mode 100644
index 0000000000000..0b07186a6ca33
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.settype.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [setType](./kibana-plugin-plugins-data-public.aggconfig.settype.md)
+
+## AggConfig.setType() method
+
+Signature:
+
+```typescript
+setType(type: IAggType): void;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| type | IAggType
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.todsl.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.todsl.md
new file mode 100644
index 0000000000000..ac655c2a88a7b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.todsl.md
@@ -0,0 +1,26 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [toDsl](./kibana-plugin-plugins-data-public.aggconfig.todsl.md)
+
+## AggConfig.toDsl() method
+
+Convert this aggConfig to its dsl syntax.
+
+Adds params and adhoc subaggs to a pojo, then returns it
+
+Signature:
+
+```typescript
+toDsl(aggConfigs?: IAggConfigs): any;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| aggConfigs | IAggConfigs
| |
+
+Returns:
+
+`any`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.toexpressionast.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.toexpressionast.md
new file mode 100644
index 0000000000000..99001e81fde49
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.toexpressionast.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [toExpressionAst](./kibana-plugin-plugins-data-public.aggconfig.toexpressionast.md)
+
+## AggConfig.toExpressionAst() method
+
+Signature:
+
+```typescript
+toExpressionAst(): ExpressionAstFunction | undefined;
+```
+Returns:
+
+`ExpressionAstFunction | undefined`
+
+Returns an ExpressionAst representing the function for this agg type.
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.tojson.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.tojson.md
new file mode 100644
index 0000000000000..aa639aa574076
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.tojson.md
@@ -0,0 +1,20 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [toJSON](./kibana-plugin-plugins-data-public.aggconfig.tojson.md)
+
+## AggConfig.toJSON() method
+
+> Warning: This API is now obsolete.
+>
+> - Use serialize() instead.
+>
+
+Signature:
+
+```typescript
+toJSON(): AggConfigSerialized;
+```
+Returns:
+
+`AggConfigSerialized`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.toserializedfieldformat.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.toserializedfieldformat.md
new file mode 100644
index 0000000000000..7a75950f9cc6d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.toserializedfieldformat.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [toSerializedFieldFormat](./kibana-plugin-plugins-data-public.aggconfig.toserializedfieldformat.md)
+
+## AggConfig.toSerializedFieldFormat() method
+
+Returns a serialized field format for the field used in this agg. This can be passed to fieldFormats.deserialize to get the field format instance.
+
+Signature:
+
+```typescript
+toSerializedFieldFormat(): {} | Ensure, SerializableState>;
+```
+Returns:
+
+`{} | Ensure, SerializableState>`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.type.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.type.md
new file mode 100644
index 0000000000000..9dc44caee42e8
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.type.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [type](./kibana-plugin-plugins-data-public.aggconfig.type.md)
+
+## AggConfig.type property
+
+Signature:
+
+```typescript
+get type(): IAggType;
+
+set type(type: IAggType);
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.write.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.write.md
new file mode 100644
index 0000000000000..f98394b57cac3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.write.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [write](./kibana-plugin-plugins-data-public.aggconfig.write.md)
+
+## AggConfig.write() method
+
+Signature:
+
+```typescript
+write(aggs?: IAggConfigs): Record;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| aggs | IAggConfigs
| |
+
+Returns:
+
+`Record`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs._constructor_.md
new file mode 100644
index 0000000000000..c9e08b9712480
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs._constructor_.md
@@ -0,0 +1,32 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [(constructor)](./kibana-plugin-plugins-data-public.aggconfigs._constructor_.md)
+
+## AggConfigs.(constructor)
+
+Constructs a new instance of the `AggConfigs` class
+
+Signature:
+
+```typescript
+constructor(indexPattern: IndexPattern, configStates: Pick & Pick<{
+ type: string | IAggType;
+ }, "type"> & Pick<{
+ type: string | IAggType;
+ }, never>, "enabled" | "type" | "schema" | "id" | "params">[] | undefined, opts: AggConfigsOptions);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| indexPattern | IndexPattern
| |
+| configStates | Pick<Pick<{
type: string;
enabled?: boolean | undefined;
id?: string | undefined;
params?: {} | import("./agg_config").SerializableState | undefined;
schema?: string | undefined;
}, "enabled" | "schema" | "id" | "params"> & Pick<{
type: string | IAggType;
}, "type"> & Pick<{
type: string | IAggType;
}, never>, "enabled" | "type" | "schema" | "id" | "params">[] | undefined
| |
+| opts | AggConfigsOptions
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.aggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.aggs.md
new file mode 100644
index 0000000000000..0d217e037ecb1
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.aggs.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [aggs](./kibana-plugin-plugins-data-public.aggconfigs.aggs.md)
+
+## AggConfigs.aggs property
+
+Signature:
+
+```typescript
+aggs: IAggConfig[];
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byid.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byid.md
new file mode 100644
index 0000000000000..14d65ada5e39d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byid.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [byId](./kibana-plugin-plugins-data-public.aggconfigs.byid.md)
+
+## AggConfigs.byId() method
+
+Signature:
+
+```typescript
+byId(id: string): AggConfig | undefined;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| id | string
| |
+
+Returns:
+
+`AggConfig | undefined`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byindex.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byindex.md
new file mode 100644
index 0000000000000..5977c81ddaf36
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byindex.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [byIndex](./kibana-plugin-plugins-data-public.aggconfigs.byindex.md)
+
+## AggConfigs.byIndex() method
+
+Signature:
+
+```typescript
+byIndex(index: number): AggConfig;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| index | number
| |
+
+Returns:
+
+`AggConfig`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byname.md
new file mode 100644
index 0000000000000..772ba1f074d0d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byname.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [byName](./kibana-plugin-plugins-data-public.aggconfigs.byname.md)
+
+## AggConfigs.byName() method
+
+Signature:
+
+```typescript
+byName(name: string): AggConfig[];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| name | string
| |
+
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byschemaname.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byschemaname.md
new file mode 100644
index 0000000000000..3a7c6a5f89e17
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.byschemaname.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [bySchemaName](./kibana-plugin-plugins-data-public.aggconfigs.byschemaname.md)
+
+## AggConfigs.bySchemaName() method
+
+Signature:
+
+```typescript
+bySchemaName(schema: string): AggConfig[];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| schema | string
| |
+
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.bytype.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.bytype.md
new file mode 100644
index 0000000000000..8bbf85ce4f29b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.bytype.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [byType](./kibana-plugin-plugins-data-public.aggconfigs.bytype.md)
+
+## AggConfigs.byType() method
+
+Signature:
+
+```typescript
+byType(type: string): AggConfig[];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| type | string
| |
+
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.bytypename.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.bytypename.md
new file mode 100644
index 0000000000000..97f05837493f2
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.bytypename.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [byTypeName](./kibana-plugin-plugins-data-public.aggconfigs.bytypename.md)
+
+## AggConfigs.byTypeName() method
+
+Signature:
+
+```typescript
+byTypeName(type: string): AggConfig[];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| type | string
| |
+
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.clone.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.clone.md
new file mode 100644
index 0000000000000..0206f3c6b4751
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.clone.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [clone](./kibana-plugin-plugins-data-public.aggconfigs.clone.md)
+
+## AggConfigs.clone() method
+
+Signature:
+
+```typescript
+clone({ enabledOnly }?: {
+ enabledOnly?: boolean | undefined;
+ }): AggConfigs;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| { enabledOnly } | {
enabledOnly?: boolean | undefined;
}
| |
+
+Returns:
+
+`AggConfigs`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md
new file mode 100644
index 0000000000000..2ccded7c74e4c
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [createAggConfig](./kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md)
+
+## AggConfigs.createAggConfig property
+
+Signature:
+
+```typescript
+createAggConfig: (params: CreateAggConfigParams, { addToAggConfigs }?: {
+ addToAggConfigs?: boolean | undefined;
+ }) => T;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getall.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getall.md
new file mode 100644
index 0000000000000..091ec1ce416c3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getall.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getAll](./kibana-plugin-plugins-data-public.aggconfigs.getall.md)
+
+## AggConfigs.getAll() method
+
+Signature:
+
+```typescript
+getAll(): AggConfig[];
+```
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getrequestaggbyid.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getrequestaggbyid.md
new file mode 100644
index 0000000000000..f375648ca1cb7
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getrequestaggbyid.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getRequestAggById](./kibana-plugin-plugins-data-public.aggconfigs.getrequestaggbyid.md)
+
+## AggConfigs.getRequestAggById() method
+
+Signature:
+
+```typescript
+getRequestAggById(id: string): AggConfig | undefined;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| id | string
| |
+
+Returns:
+
+`AggConfig | undefined`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getrequestaggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getrequestaggs.md
new file mode 100644
index 0000000000000..f4db6e373f5c3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getrequestaggs.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getRequestAggs](./kibana-plugin-plugins-data-public.aggconfigs.getrequestaggs.md)
+
+## AggConfigs.getRequestAggs() method
+
+Signature:
+
+```typescript
+getRequestAggs(): AggConfig[];
+```
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getresponseaggbyid.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getresponseaggbyid.md
new file mode 100644
index 0000000000000..ab31c74f6000d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getresponseaggbyid.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getResponseAggById](./kibana-plugin-plugins-data-public.aggconfigs.getresponseaggbyid.md)
+
+## AggConfigs.getResponseAggById() method
+
+Find a response agg by it's id. This may be an agg in the aggConfigs, or one created specifically for a response value
+
+Signature:
+
+```typescript
+getResponseAggById(id: string): AggConfig | undefined;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| id | string
| |
+
+Returns:
+
+`AggConfig | undefined`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getresponseaggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getresponseaggs.md
new file mode 100644
index 0000000000000..47e26bdea9e9c
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.getresponseaggs.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getResponseAggs](./kibana-plugin-plugins-data-public.aggconfigs.getresponseaggs.md)
+
+## AggConfigs.getResponseAggs() method
+
+Gets the AggConfigs (and possibly ResponseAggConfigs) that represent the values that will be produced when all aggs are run.
+
+With multi-value metric aggs it is possible for a single agg request to result in multiple agg values, which is why the length of a vis' responseValuesAggs may be different than the vis' aggs
+
+ {array\[AggConfig\]}
+
+Signature:
+
+```typescript
+getResponseAggs(): AggConfig[];
+```
+Returns:
+
+`AggConfig[]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md
new file mode 100644
index 0000000000000..9bd91e185df1e
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [indexPattern](./kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md)
+
+## AggConfigs.indexPattern property
+
+Signature:
+
+```typescript
+indexPattern: IndexPattern;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.jsondataequals.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.jsondataequals.md
new file mode 100644
index 0000000000000..d94c3959cd6a2
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.jsondataequals.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [jsonDataEquals](./kibana-plugin-plugins-data-public.aggconfigs.jsondataequals.md)
+
+## AggConfigs.jsonDataEquals() method
+
+Data-by-data comparison of this Aggregation Ignores the non-array indexes
+
+Signature:
+
+```typescript
+jsonDataEquals(aggConfigs: AggConfig[]): boolean;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| aggConfigs | AggConfig[]
| |
+
+Returns:
+
+`boolean`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md
new file mode 100644
index 0000000000000..c0ba1bbeea334
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.md
@@ -0,0 +1,48 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md)
+
+## AggConfigs class
+
+Signature:
+
+```typescript
+export declare class AggConfigs
+```
+
+## Constructors
+
+| Constructor | Modifiers | Description |
+| --- | --- | --- |
+| [(constructor)(indexPattern, configStates, opts)](./kibana-plugin-plugins-data-public.aggconfigs._constructor_.md) | | Constructs a new instance of the AggConfigs
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [aggs](./kibana-plugin-plugins-data-public.aggconfigs.aggs.md) | | IAggConfig[]
| |
+| [createAggConfig](./kibana-plugin-plugins-data-public.aggconfigs.createaggconfig.md) | | <T extends AggConfig = AggConfig>(params: CreateAggConfigParams, { addToAggConfigs }?: {
addToAggConfigs?: boolean | undefined;
}) => T
| |
+| [indexPattern](./kibana-plugin-plugins-data-public.aggconfigs.indexpattern.md) | | IndexPattern
| |
+| [timeRange](./kibana-plugin-plugins-data-public.aggconfigs.timerange.md) | | TimeRange
| |
+
+## Methods
+
+| Method | Modifiers | Description |
+| --- | --- | --- |
+| [byId(id)](./kibana-plugin-plugins-data-public.aggconfigs.byid.md) | | |
+| [byIndex(index)](./kibana-plugin-plugins-data-public.aggconfigs.byindex.md) | | |
+| [byName(name)](./kibana-plugin-plugins-data-public.aggconfigs.byname.md) | | |
+| [bySchemaName(schema)](./kibana-plugin-plugins-data-public.aggconfigs.byschemaname.md) | | |
+| [byType(type)](./kibana-plugin-plugins-data-public.aggconfigs.bytype.md) | | |
+| [byTypeName(type)](./kibana-plugin-plugins-data-public.aggconfigs.bytypename.md) | | |
+| [clone({ enabledOnly })](./kibana-plugin-plugins-data-public.aggconfigs.clone.md) | | |
+| [getAll()](./kibana-plugin-plugins-data-public.aggconfigs.getall.md) | | |
+| [getRequestAggById(id)](./kibana-plugin-plugins-data-public.aggconfigs.getrequestaggbyid.md) | | |
+| [getRequestAggs()](./kibana-plugin-plugins-data-public.aggconfigs.getrequestaggs.md) | | |
+| [getResponseAggById(id)](./kibana-plugin-plugins-data-public.aggconfigs.getresponseaggbyid.md) | | Find a response agg by it's id. This may be an agg in the aggConfigs, or one created specifically for a response value |
+| [getResponseAggs()](./kibana-plugin-plugins-data-public.aggconfigs.getresponseaggs.md) | | Gets the AggConfigs (and possibly ResponseAggConfigs) that represent the values that will be produced when all aggs are run.With multi-value metric aggs it is possible for a single agg request to result in multiple agg values, which is why the length of a vis' responseValuesAggs may be different than the vis' aggs {array\[AggConfig\]} |
+| [jsonDataEquals(aggConfigs)](./kibana-plugin-plugins-data-public.aggconfigs.jsondataequals.md) | | Data-by-data comparison of this Aggregation Ignores the non-array indexes |
+| [onSearchRequestStart(searchSource, options)](./kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md) | | |
+| [setTimeRange(timeRange)](./kibana-plugin-plugins-data-public.aggconfigs.settimerange.md) | | |
+| [toDsl(hierarchical)](./kibana-plugin-plugins-data-public.aggconfigs.todsl.md) | | |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md
new file mode 100644
index 0000000000000..3ae7af408563c
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md
@@ -0,0 +1,23 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [onSearchRequestStart](./kibana-plugin-plugins-data-public.aggconfigs.onsearchrequeststart.md)
+
+## AggConfigs.onSearchRequestStart() method
+
+Signature:
+
+```typescript
+onSearchRequestStart(searchSource: ISearchSource, options?: ISearchOptions): Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| searchSource | ISearchSource
| |
+| options | ISearchOptions
| |
+
+Returns:
+
+`Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.settimerange.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.settimerange.md
new file mode 100644
index 0000000000000..77530f02bc9a3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.settimerange.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [setTimeRange](./kibana-plugin-plugins-data-public.aggconfigs.settimerange.md)
+
+## AggConfigs.setTimeRange() method
+
+Signature:
+
+```typescript
+setTimeRange(timeRange: TimeRange): void;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| timeRange | TimeRange
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.timerange.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.timerange.md
new file mode 100644
index 0000000000000..b4caef6c7f6d2
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.timerange.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [timeRange](./kibana-plugin-plugins-data-public.aggconfigs.timerange.md)
+
+## AggConfigs.timeRange property
+
+Signature:
+
+```typescript
+timeRange?: TimeRange;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.todsl.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.todsl.md
new file mode 100644
index 0000000000000..055c4113ca3e4
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.todsl.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [toDsl](./kibana-plugin-plugins-data-public.aggconfigs.todsl.md)
+
+## AggConfigs.toDsl() method
+
+Signature:
+
+```typescript
+toDsl(hierarchical?: boolean): Record;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| hierarchical | boolean
| |
+
+Returns:
+
+`Record`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggsstart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggsstart.md
new file mode 100644
index 0000000000000..7bdf9d6501203
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.aggsstart.md
@@ -0,0 +1,15 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggsStart](./kibana-plugin-plugins-data-public.aggsstart.md)
+
+## AggsStart type
+
+AggsStart represents the actual external contract as AggsCommonStart is only used internally. The difference is that AggsStart includes the typings for the registry with initialized agg types.
+
+Signature:
+
+```typescript
+export declare type AggsStart = Assign;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.autocompletestart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.autocompletestart.md
new file mode 100644
index 0000000000000..44cee8c32421d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.autocompletestart.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AutocompleteStart](./kibana-plugin-plugins-data-public.autocompletestart.md)
+
+## AutocompleteStart type
+
+\*
+
+Signature:
+
+```typescript
+export declare type AutocompleteStart = ReturnType;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginsetup.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginsetup.md
index dba1d79e78682..fc5624aeddce1 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginsetup.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginsetup.md
@@ -4,6 +4,8 @@
## DataPublicPluginSetup interface
+Data plugin public Setup contract
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md
index 25ce6eaa688f8..10997c94fab06 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md
@@ -4,11 +4,10 @@
## DataPublicPluginStart.actions property
+filter creation utilities [DataPublicPluginStartActions](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.md)
+
Signature:
```typescript
-actions: {
- createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
- createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
- };
+actions: DataPublicPluginStartActions;
```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md
index d2e5aee7d90dd..8a09a10cccb24 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md
@@ -4,6 +4,8 @@
## DataPublicPluginStart.autocomplete property
+autocomplete service [AutocompleteStart](./kibana-plugin-plugins-data-public.autocompletestart.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md
index dd4b38f64d10b..344044b38f7de 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md
@@ -4,6 +4,8 @@
## DataPublicPluginStart.fieldFormats property
+field formats service [FieldFormatsStart](./kibana-plugin-plugins-data-public.fieldformatsstart.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md
index b3dd6a61760a6..0cf1e3101713d 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md
@@ -4,6 +4,8 @@
## DataPublicPluginStart.indexPatterns property
+index patterns service [IndexPatternsContract](./kibana-plugin-plugins-data-public.indexpatternscontract.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.md
index 4f43f10ce089e..10cdec23f4732 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.md
@@ -4,6 +4,8 @@
## DataPublicPluginStart interface
+Data plugin public Start contract
+
Signature:
```typescript
@@ -14,11 +16,11 @@ export interface DataPublicPluginStart
| Property | Type | Description |
| --- | --- | --- |
-| [actions](./kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md) | {
createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
}
| |
-| [autocomplete](./kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md) | AutocompleteStart
| |
-| [fieldFormats](./kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md) | FieldFormatsStart
| |
-| [indexPatterns](./kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md) | IndexPatternsContract
| |
-| [query](./kibana-plugin-plugins-data-public.datapublicpluginstart.query.md) | QueryStart
| |
-| [search](./kibana-plugin-plugins-data-public.datapublicpluginstart.search.md) | ISearchStart
| |
-| [ui](./kibana-plugin-plugins-data-public.datapublicpluginstart.ui.md) | {
IndexPatternSelect: React.ComponentType<IndexPatternSelectProps>;
SearchBar: React.ComponentType<StatefulSearchBarProps>;
}
| |
+| [actions](./kibana-plugin-plugins-data-public.datapublicpluginstart.actions.md) | DataPublicPluginStartActions
| filter creation utilities [DataPublicPluginStartActions](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.md) |
+| [autocomplete](./kibana-plugin-plugins-data-public.datapublicpluginstart.autocomplete.md) | AutocompleteStart
| autocomplete service [AutocompleteStart](./kibana-plugin-plugins-data-public.autocompletestart.md) |
+| [fieldFormats](./kibana-plugin-plugins-data-public.datapublicpluginstart.fieldformats.md) | FieldFormatsStart
| field formats service [FieldFormatsStart](./kibana-plugin-plugins-data-public.fieldformatsstart.md) |
+| [indexPatterns](./kibana-plugin-plugins-data-public.datapublicpluginstart.indexpatterns.md) | IndexPatternsContract
| index patterns service [IndexPatternsContract](./kibana-plugin-plugins-data-public.indexpatternscontract.md) |
+| [query](./kibana-plugin-plugins-data-public.datapublicpluginstart.query.md) | QueryStart
| query service [QueryStart](./kibana-plugin-plugins-data-public.querystart.md) |
+| [search](./kibana-plugin-plugins-data-public.datapublicpluginstart.search.md) | ISearchStart
| search service [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md) |
+| [ui](./kibana-plugin-plugins-data-public.datapublicpluginstart.ui.md) | DataPublicPluginStartUi
| prewired ui components [DataPublicPluginStartUi](./kibana-plugin-plugins-data-public.datapublicpluginstartui.md) |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.query.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.query.md
index a44e250077ed4..16ba5dafbb264 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.query.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.query.md
@@ -4,6 +4,8 @@
## DataPublicPluginStart.query property
+query service [QueryStart](./kibana-plugin-plugins-data-public.querystart.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.search.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.search.md
index eec00e7b13e9d..98832d7ca11d8 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.search.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.search.md
@@ -4,6 +4,8 @@
## DataPublicPluginStart.search property
+search service [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.ui.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.ui.md
index 9c24216834371..b4bda66ecae3f 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.ui.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstart.ui.md
@@ -4,11 +4,10 @@
## DataPublicPluginStart.ui property
+prewired ui components [DataPublicPluginStartUi](./kibana-plugin-plugins-data-public.datapublicpluginstartui.md)
+
Signature:
```typescript
-ui: {
- IndexPatternSelect: React.ComponentType;
- SearchBar: React.ComponentType;
- };
+ui: DataPublicPluginStartUi;
```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromrangeselectaction.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromrangeselectaction.md
new file mode 100644
index 0000000000000..c954e0095cbb6
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromrangeselectaction.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStartActions](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.md) > [createFiltersFromRangeSelectAction](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromrangeselectaction.md)
+
+## DataPublicPluginStartActions.createFiltersFromRangeSelectAction property
+
+Signature:
+
+```typescript
+createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromvalueclickaction.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromvalueclickaction.md
new file mode 100644
index 0000000000000..70bd5091f3604
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromvalueclickaction.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStartActions](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.md) > [createFiltersFromValueClickAction](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromvalueclickaction.md)
+
+## DataPublicPluginStartActions.createFiltersFromValueClickAction property
+
+Signature:
+
+```typescript
+createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.md
new file mode 100644
index 0000000000000..d44c9e892cb80
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartactions.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStartActions](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.md)
+
+## DataPublicPluginStartActions interface
+
+utilities to generate filters from action context
+
+Signature:
+
+```typescript
+export interface DataPublicPluginStartActions
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [createFiltersFromRangeSelectAction](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromrangeselectaction.md) | typeof createFiltersFromRangeSelectAction
| |
+| [createFiltersFromValueClickAction](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.createfiltersfromvalueclickaction.md) | typeof createFiltersFromValueClickAction
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.indexpatternselect.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.indexpatternselect.md
new file mode 100644
index 0000000000000..eac29dc5de70d
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.indexpatternselect.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStartUi](./kibana-plugin-plugins-data-public.datapublicpluginstartui.md) > [IndexPatternSelect](./kibana-plugin-plugins-data-public.datapublicpluginstartui.indexpatternselect.md)
+
+## DataPublicPluginStartUi.IndexPatternSelect property
+
+Signature:
+
+```typescript
+IndexPatternSelect: React.ComponentType;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.md
new file mode 100644
index 0000000000000..690b10bd6cca3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStartUi](./kibana-plugin-plugins-data-public.datapublicpluginstartui.md)
+
+## DataPublicPluginStartUi interface
+
+data plugin prewired UI components
+
+Signature:
+
+```typescript
+export interface DataPublicPluginStartUi
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [IndexPatternSelect](./kibana-plugin-plugins-data-public.datapublicpluginstartui.indexpatternselect.md) | React.ComponentType<IndexPatternSelectProps>
| |
+| [SearchBar](./kibana-plugin-plugins-data-public.datapublicpluginstartui.searchbar.md) | React.ComponentType<StatefulSearchBarProps>
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.searchbar.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.searchbar.md
new file mode 100644
index 0000000000000..06339d14cde24
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.datapublicpluginstartui.searchbar.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [DataPublicPluginStartUi](./kibana-plugin-plugins-data-public.datapublicpluginstartui.md) > [SearchBar](./kibana-plugin-plugins-data-public.datapublicpluginstartui.searchbar.md)
+
+## DataPublicPluginStartUi.SearchBar property
+
+Signature:
+
+```typescript
+SearchBar: React.ComponentType;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformatsstart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformatsstart.md
new file mode 100644
index 0000000000000..1a0a08f44451a
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.fieldformatsstart.md
@@ -0,0 +1,14 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [FieldFormatsStart](./kibana-plugin-plugins-data-public.fieldformatsstart.md)
+
+## FieldFormatsStart type
+
+
+Signature:
+
+```typescript
+export declare type FieldFormatsStart = Omit & {
+ deserialize: FormatFactory;
+};
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.aggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.aggs.md
new file mode 100644
index 0000000000000..ad97820d4d760
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.aggs.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchSetup](./kibana-plugin-plugins-data-public.isearchsetup.md) > [aggs](./kibana-plugin-plugins-data-public.isearchsetup.aggs.md)
+
+## ISearchSetup.aggs property
+
+Signature:
+
+```typescript
+aggs: AggsSetup;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.md
new file mode 100644
index 0000000000000..b68c4d61e4e03
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchSetup](./kibana-plugin-plugins-data-public.isearchsetup.md)
+
+## ISearchSetup interface
+
+The setup contract exposed by the Search plugin exposes the search strategy extension point.
+
+Signature:
+
+```typescript
+export interface ISearchSetup
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [aggs](./kibana-plugin-plugins-data-public.isearchsetup.aggs.md) | AggsSetup
| |
+| [usageCollector](./kibana-plugin-plugins-data-public.isearchsetup.usagecollector.md) | SearchUsageCollector
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.usagecollector.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.usagecollector.md
new file mode 100644
index 0000000000000..908a842974f25
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsetup.usagecollector.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchSetup](./kibana-plugin-plugins-data-public.isearchsetup.md) > [usageCollector](./kibana-plugin-plugins-data-public.isearchsetup.usagecollector.md)
+
+## ISearchSetup.usageCollector property
+
+Signature:
+
+```typescript
+usageCollector?: SearchUsageCollector;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsource.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsource.md
index 4b9f6e3594dc5..43e10d0bef57a 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsource.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchsource.md
@@ -4,7 +4,7 @@
## ISearchSource type
-\*
+search source interface
Signature:
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.aggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.aggs.md
new file mode 100644
index 0000000000000..993c6bf5a922b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.aggs.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md) > [aggs](./kibana-plugin-plugins-data-public.isearchstart.aggs.md)
+
+## ISearchStart.aggs property
+
+agg config sub service [AggsStart](./kibana-plugin-plugins-data-public.aggsstart.md)
+
+Signature:
+
+```typescript
+aggs: AggsStart;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.md
new file mode 100644
index 0000000000000..cee213fc6e7e3
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.md
@@ -0,0 +1,22 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md)
+
+## ISearchStart interface
+
+search service
+
+Signature:
+
+```typescript
+export interface ISearchStart
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [aggs](./kibana-plugin-plugins-data-public.isearchstart.aggs.md) | AggsStart
| agg config sub service [AggsStart](./kibana-plugin-plugins-data-public.aggsstart.md) |
+| [search](./kibana-plugin-plugins-data-public.isearchstart.search.md) | ISearchGeneric
| low level search [ISearchGeneric](./kibana-plugin-plugins-data-public.isearchgeneric.md) |
+| [searchSource](./kibana-plugin-plugins-data-public.isearchstart.searchsource.md) | ISearchStartSearchSource
| high level search [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md) |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.search.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.search.md
new file mode 100644
index 0000000000000..80e140e9fdd5c
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.search.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md) > [search](./kibana-plugin-plugins-data-public.isearchstart.search.md)
+
+## ISearchStart.search property
+
+low level search [ISearchGeneric](./kibana-plugin-plugins-data-public.isearchgeneric.md)
+
+Signature:
+
+```typescript
+search: ISearchGeneric;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.searchsource.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.searchsource.md
new file mode 100644
index 0000000000000..5d4b884b2c25b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstart.searchsource.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md) > [searchSource](./kibana-plugin-plugins-data-public.isearchstart.searchsource.md)
+
+## ISearchStart.searchSource property
+
+high level search [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md)
+
+Signature:
+
+```typescript
+searchSource: ISearchStartSearchSource;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.create.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.create.md
new file mode 100644
index 0000000000000..7f6344b82d27c
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.create.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md) > [create](./kibana-plugin-plugins-data-public.isearchstartsearchsource.create.md)
+
+## ISearchStartSearchSource.create property
+
+creates [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) based on provided serialized [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md)
+
+Signature:
+
+```typescript
+create: (fields?: SearchSourceFields) => Promise;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.createempty.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.createempty.md
new file mode 100644
index 0000000000000..b13b5d227c8b4
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.createempty.md
@@ -0,0 +1,13 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md) > [createEmpty](./kibana-plugin-plugins-data-public.isearchstartsearchsource.createempty.md)
+
+## ISearchStartSearchSource.createEmpty property
+
+creates empty [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md)
+
+Signature:
+
+```typescript
+createEmpty: () => ISearchSource;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.md
new file mode 100644
index 0000000000000..f10d5bb002a0f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.isearchstartsearchsource.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md)
+
+## ISearchStartSearchSource interface
+
+high level search service
+
+Signature:
+
+```typescript
+export interface ISearchStartSearchSource
+```
+
+## Properties
+
+| Property | Type | Description |
+| --- | --- | --- |
+| [create](./kibana-plugin-plugins-data-public.isearchstartsearchsource.create.md) | (fields?: SearchSourceFields) => Promise<ISearchSource>
| creates [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) based on provided serialized [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) |
+| [createEmpty](./kibana-plugin-plugins-data-public.isearchstartsearchsource.createempty.md) | () => ISearchSource
| creates empty [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
index 0c493ca492953..6774930eef134 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.md
@@ -8,6 +8,8 @@
| Class | Description |
| --- | --- |
+| [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) | |
+| [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) | |
| [AggParamType](./kibana-plugin-plugins-data-public.aggparamtype.md) | |
| [FieldFormat](./kibana-plugin-plugins-data-public.fieldformat.md) | |
| [FilterManager](./kibana-plugin-plugins-data-public.filtermanager.md) | |
@@ -18,6 +20,7 @@
| [Plugin](./kibana-plugin-plugins-data-public.plugin.md) | |
| [RequestTimeoutError](./kibana-plugin-plugins-data-public.requesttimeouterror.md) | Class used to signify that a request timed out. Useful for applications to conditionally handle this type of error differently than other errors. |
| [SearchInterceptor](./kibana-plugin-plugins-data-public.searchinterceptor.md) | |
+| [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) | \* |
| [TimeHistory](./kibana-plugin-plugins-data-public.timehistory.md) | |
## Enumerations
@@ -47,8 +50,10 @@
| --- | --- |
| [AggParamOption](./kibana-plugin-plugins-data-public.aggparamoption.md) | |
| [ApplyGlobalFilterActionContext](./kibana-plugin-plugins-data-public.applyglobalfilteractioncontext.md) | |
-| [DataPublicPluginSetup](./kibana-plugin-plugins-data-public.datapublicpluginsetup.md) | |
-| [DataPublicPluginStart](./kibana-plugin-plugins-data-public.datapublicpluginstart.md) | |
+| [DataPublicPluginSetup](./kibana-plugin-plugins-data-public.datapublicpluginsetup.md) | Data plugin public Setup contract |
+| [DataPublicPluginStart](./kibana-plugin-plugins-data-public.datapublicpluginstart.md) | Data plugin public Start contract |
+| [DataPublicPluginStartActions](./kibana-plugin-plugins-data-public.datapublicpluginstartactions.md) | utilities to generate filters from action context |
+| [DataPublicPluginStartUi](./kibana-plugin-plugins-data-public.datapublicpluginstartui.md) | data plugin prewired UI components |
| [EsQueryConfig](./kibana-plugin-plugins-data-public.esqueryconfig.md) | |
| [FieldFormatConfig](./kibana-plugin-plugins-data-public.fieldformatconfig.md) | |
| [FieldMappingSpec](./kibana-plugin-plugins-data-public.fieldmappingspec.md) | |
@@ -65,6 +70,9 @@
| [IndexPatternAttributes](./kibana-plugin-plugins-data-public.indexpatternattributes.md) | Use data plugin interface instead |
| [IndexPatternTypeMeta](./kibana-plugin-plugins-data-public.indexpatterntypemeta.md) | |
| [ISearchOptions](./kibana-plugin-plugins-data-public.isearchoptions.md) | |
+| [ISearchSetup](./kibana-plugin-plugins-data-public.isearchsetup.md) | The setup contract exposed by the Search plugin exposes the search strategy extension point. |
+| [ISearchStart](./kibana-plugin-plugins-data-public.isearchstart.md) | search service |
+| [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md) | high level search service |
| [KueryNode](./kibana-plugin-plugins-data-public.kuerynode.md) | |
| [OptionedValueProp](./kibana-plugin-plugins-data-public.optionedvalueprop.md) | |
| [Query](./kibana-plugin-plugins-data-public.query.md) | |
@@ -79,7 +87,7 @@
| [SavedQueryService](./kibana-plugin-plugins-data-public.savedqueryservice.md) | |
| [SearchError](./kibana-plugin-plugins-data-public.searcherror.md) | |
| [SearchInterceptorDeps](./kibana-plugin-plugins-data-public.searchinterceptordeps.md) | |
-| [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) | |
+| [SearchSourceFields](./kibana-plugin-plugins-data-public.searchsourcefields.md) | search source fields |
| [TabbedAggColumn](./kibana-plugin-plugins-data-public.tabbedaggcolumn.md) | \* |
| [TabbedTable](./kibana-plugin-plugins-data-public.tabbedtable.md) | \* |
| [TimeRange](./kibana-plugin-plugins-data-public.timerange.md) | |
@@ -125,6 +133,8 @@
| [AggConfigOptions](./kibana-plugin-plugins-data-public.aggconfigoptions.md) | |
| [AggGroupName](./kibana-plugin-plugins-data-public.agggroupname.md) | |
| [AggParam](./kibana-plugin-plugins-data-public.aggparam.md) | |
+| [AggsStart](./kibana-plugin-plugins-data-public.aggsstart.md) | AggsStart represents the actual external contract as AggsCommonStart is only used internally. The difference is that AggsStart includes the typings for the registry with initialized agg types. |
+| [AutocompleteStart](./kibana-plugin-plugins-data-public.autocompletestart.md) | \* |
| [CustomFilter](./kibana-plugin-plugins-data-public.customfilter.md) | |
| [EsaggsExpressionFunctionDefinition](./kibana-plugin-plugins-data-public.esaggsexpressionfunctiondefinition.md) | |
| [EsdslExpressionFunctionDefinition](./kibana-plugin-plugins-data-public.esdslexpressionfunctiondefinition.md) | |
@@ -134,6 +144,7 @@
| [FieldFormatId](./kibana-plugin-plugins-data-public.fieldformatid.md) | id type is needed for creating custom converters. |
| [FieldFormatsContentType](./kibana-plugin-plugins-data-public.fieldformatscontenttype.md) | \* |
| [FieldFormatsGetConfigFn](./kibana-plugin-plugins-data-public.fieldformatsgetconfigfn.md) | |
+| [FieldFormatsStart](./kibana-plugin-plugins-data-public.fieldformatsstart.md) | |
| [IAggConfig](./kibana-plugin-plugins-data-public.iaggconfig.md) | AggConfig This class represents an aggregation, which is displayed in the left-hand nav of the Visualize app. |
| [IAggType](./kibana-plugin-plugins-data-public.iaggtype.md) | |
| [IFieldFormat](./kibana-plugin-plugins-data-public.ifieldformat.md) | |
@@ -145,12 +156,13 @@
| [InputTimeRange](./kibana-plugin-plugins-data-public.inputtimerange.md) | |
| [ISearch](./kibana-plugin-plugins-data-public.isearch.md) | |
| [ISearchGeneric](./kibana-plugin-plugins-data-public.isearchgeneric.md) | |
-| [ISearchSource](./kibana-plugin-plugins-data-public.isearchsource.md) | \* |
+| [ISearchSource](./kibana-plugin-plugins-data-public.isearchsource.md) | search source interface |
| [MappingObject](./kibana-plugin-plugins-data-public.mappingobject.md) | |
| [MatchAllFilter](./kibana-plugin-plugins-data-public.matchallfilter.md) | |
| [ParsedInterval](./kibana-plugin-plugins-data-public.parsedinterval.md) | |
| [PhraseFilter](./kibana-plugin-plugins-data-public.phrasefilter.md) | |
| [PhrasesFilter](./kibana-plugin-plugins-data-public.phrasesfilter.md) | |
+| [QueryStart](./kibana-plugin-plugins-data-public.querystart.md) | |
| [QuerySuggestion](./kibana-plugin-plugins-data-public.querysuggestion.md) | \* |
| [QuerySuggestionGetFn](./kibana-plugin-plugins-data-public.querysuggestiongetfn.md) | |
| [RangeFilter](./kibana-plugin-plugins-data-public.rangefilter.md) | |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystart.md
new file mode 100644
index 0000000000000..f48a9ee7a79e4
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.querystart.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [QueryStart](./kibana-plugin-plugins-data-public.querystart.md)
+
+## QueryStart type
+
+Signature:
+
+```typescript
+export declare type QueryStart = ReturnType;
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource._constructor_.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource._constructor_.md
new file mode 100644
index 0000000000000..00e9050ee8ff9
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource._constructor_.md
@@ -0,0 +1,21 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [(constructor)](./kibana-plugin-plugins-data-public.searchsource._constructor_.md)
+
+## SearchSource.(constructor)
+
+Constructs a new instance of the `SearchSource` class
+
+Signature:
+
+```typescript
+constructor(fields: SearchSourceFields | undefined, dependencies: SearchSourceDependencies);
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| fields | SearchSourceFields | undefined
| |
+| dependencies | SearchSourceDependencies
| |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.create.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.create.md
new file mode 100644
index 0000000000000..990f19fd94bac
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.create.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [create](./kibana-plugin-plugins-data-public.searchsource.create.md)
+
+## SearchSource.create() method
+
+deprecated, don't use
+
+Signature:
+
+```typescript
+create(): SearchSource;
+```
+Returns:
+
+`SearchSource`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.createchild.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.createchild.md
new file mode 100644
index 0000000000000..0c2e75651b354
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.createchild.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [createChild](./kibana-plugin-plugins-data-public.searchsource.createchild.md)
+
+## SearchSource.createChild() method
+
+creates a new child search source
+
+Signature:
+
+```typescript
+createChild(options?: {}): SearchSource;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| options | {}
| |
+
+Returns:
+
+`SearchSource`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.createcopy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.createcopy.md
new file mode 100644
index 0000000000000..1053d31010d00
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.createcopy.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [createCopy](./kibana-plugin-plugins-data-public.searchsource.createcopy.md)
+
+## SearchSource.createCopy() method
+
+creates a copy of this search source (without its children)
+
+Signature:
+
+```typescript
+createCopy(): SearchSource;
+```
+Returns:
+
+`SearchSource`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.destroy.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.destroy.md
new file mode 100644
index 0000000000000..8a7cc5ee75d11
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.destroy.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [destroy](./kibana-plugin-plugins-data-public.searchsource.destroy.md)
+
+## SearchSource.destroy() method
+
+Completely destroy the SearchSource. {undefined}
+
+Signature:
+
+```typescript
+destroy(): void;
+```
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.fetch.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.fetch.md
new file mode 100644
index 0000000000000..8fd17e6b1a1d9
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.fetch.md
@@ -0,0 +1,25 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [fetch](./kibana-plugin-plugins-data-public.searchsource.fetch.md)
+
+## SearchSource.fetch() method
+
+Fetch this source and reject the returned Promise on error
+
+
+Signature:
+
+```typescript
+fetch(options?: ISearchOptions): Promise>;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| options | ISearchOptions
| |
+
+Returns:
+
+`Promise>`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getfield.md
new file mode 100644
index 0000000000000..7c516cc29df15
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getfield.md
@@ -0,0 +1,25 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getField](./kibana-plugin-plugins-data-public.searchsource.getfield.md)
+
+## SearchSource.getField() method
+
+Gets a single field from the fields
+
+Signature:
+
+```typescript
+getField(field: K, recurse?: boolean): SearchSourceFields[K];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| field | K
| |
+| recurse | boolean
| |
+
+Returns:
+
+`SearchSourceFields[K]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getfields.md
new file mode 100644
index 0000000000000..1980227bee623
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getfields.md
@@ -0,0 +1,51 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getFields](./kibana-plugin-plugins-data-public.searchsource.getfields.md)
+
+## SearchSource.getFields() method
+
+returns all search source fields
+
+Signature:
+
+```typescript
+getFields(): {
+ type?: string | undefined;
+ query?: import("../..").Query | undefined;
+ filter?: Filter | Filter[] | (() => Filter | Filter[] | undefined) | undefined;
+ sort?: Record | Record[] | undefined;
+ highlight?: any;
+ highlightAll?: boolean | undefined;
+ aggs?: any;
+ from?: number | undefined;
+ size?: number | undefined;
+ source?: string | boolean | string[] | undefined;
+ version?: boolean | undefined;
+ fields?: string | boolean | string[] | undefined;
+ index?: import("../..").IndexPattern | undefined;
+ searchAfter?: import("./types").EsQuerySearchAfter | undefined;
+ timeout?: string | undefined;
+ terminate_after?: number | undefined;
+ };
+```
+Returns:
+
+`{
+ type?: string | undefined;
+ query?: import("../..").Query | undefined;
+ filter?: Filter | Filter[] | (() => Filter | Filter[] | undefined) | undefined;
+ sort?: Record | Record[] | undefined;
+ highlight?: any;
+ highlightAll?: boolean | undefined;
+ aggs?: any;
+ from?: number | undefined;
+ size?: number | undefined;
+ source?: string | boolean | string[] | undefined;
+ version?: boolean | undefined;
+ fields?: string | boolean | string[] | undefined;
+ index?: import("../..").IndexPattern | undefined;
+ searchAfter?: import("./types").EsQuerySearchAfter | undefined;
+ timeout?: string | undefined;
+ terminate_after?: number | undefined;
+ }`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getid.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getid.md
new file mode 100644
index 0000000000000..b33410d86ae85
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getid.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getId](./kibana-plugin-plugins-data-public.searchsource.getid.md)
+
+## SearchSource.getId() method
+
+returns search source id
+
+Signature:
+
+```typescript
+getId(): string;
+```
+Returns:
+
+`string`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getownfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getownfield.md
new file mode 100644
index 0000000000000..d5a133772264e
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getownfield.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getOwnField](./kibana-plugin-plugins-data-public.searchsource.getownfield.md)
+
+## SearchSource.getOwnField() method
+
+Get the field from our own fields, don't traverse up the chain
+
+Signature:
+
+```typescript
+getOwnField(field: K): SearchSourceFields[K];
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| field | K
| |
+
+Returns:
+
+`SearchSourceFields[K]`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getparent.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getparent.md
new file mode 100644
index 0000000000000..14578f7949ba6
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getparent.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getParent](./kibana-plugin-plugins-data-public.searchsource.getparent.md)
+
+## SearchSource.getParent() method
+
+Get the parent of this SearchSource {undefined\|searchSource}
+
+Signature:
+
+```typescript
+getParent(): SearchSource | undefined;
+```
+Returns:
+
+`SearchSource | undefined`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getsearchrequestbody.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getsearchrequestbody.md
new file mode 100644
index 0000000000000..247b2889032fe
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getsearchrequestbody.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getSearchRequestBody](./kibana-plugin-plugins-data-public.searchsource.getsearchrequestbody.md)
+
+## SearchSource.getSearchRequestBody() method
+
+get resulting DSL
+
+Signature:
+
+```typescript
+getSearchRequestBody(): Promise;
+```
+Returns:
+
+`Promise`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getserializedfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getserializedfields.md
new file mode 100644
index 0000000000000..3f58a76b24cd0
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.getserializedfields.md
@@ -0,0 +1,17 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [getSerializedFields](./kibana-plugin-plugins-data-public.searchsource.getserializedfields.md)
+
+## SearchSource.getSerializedFields() method
+
+serializes search source fields (which can later be passed to [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md))
+
+Signature:
+
+```typescript
+getSerializedFields(): SearchSourceFields;
+```
+Returns:
+
+`SearchSourceFields`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.history.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.history.md
new file mode 100644
index 0000000000000..e77c9dac7239f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.history.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [history](./kibana-plugin-plugins-data-public.searchsource.history.md)
+
+## SearchSource.history property
+
+Signature:
+
+```typescript
+history: SearchRequest[];
+```
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.md
new file mode 100644
index 0000000000000..4cfbf8adab09f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.md
@@ -0,0 +1,49 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md)
+
+## SearchSource class
+
+\*
+
+Signature:
+
+```typescript
+export declare class SearchSource
+```
+
+## Constructors
+
+| Constructor | Modifiers | Description |
+| --- | --- | --- |
+| [(constructor)(fields, dependencies)](./kibana-plugin-plugins-data-public.searchsource._constructor_.md) | | Constructs a new instance of the SearchSource
class |
+
+## Properties
+
+| Property | Modifiers | Type | Description |
+| --- | --- | --- | --- |
+| [history](./kibana-plugin-plugins-data-public.searchsource.history.md) | | SearchRequest[]
| |
+
+## Methods
+
+| Method | Modifiers | Description |
+| --- | --- | --- |
+| [create()](./kibana-plugin-plugins-data-public.searchsource.create.md) | | deprecated, don't use |
+| [createChild(options)](./kibana-plugin-plugins-data-public.searchsource.createchild.md) | | creates a new child search source |
+| [createCopy()](./kibana-plugin-plugins-data-public.searchsource.createcopy.md) | | creates a copy of this search source (without its children) |
+| [destroy()](./kibana-plugin-plugins-data-public.searchsource.destroy.md) | | Completely destroy the SearchSource. {undefined} |
+| [fetch(options)](./kibana-plugin-plugins-data-public.searchsource.fetch.md) | | Fetch this source and reject the returned Promise on error |
+| [getField(field, recurse)](./kibana-plugin-plugins-data-public.searchsource.getfield.md) | | Gets a single field from the fields |
+| [getFields()](./kibana-plugin-plugins-data-public.searchsource.getfields.md) | | returns all search source fields |
+| [getId()](./kibana-plugin-plugins-data-public.searchsource.getid.md) | | returns search source id |
+| [getOwnField(field)](./kibana-plugin-plugins-data-public.searchsource.getownfield.md) | | Get the field from our own fields, don't traverse up the chain |
+| [getParent()](./kibana-plugin-plugins-data-public.searchsource.getparent.md) | | Get the parent of this SearchSource {undefined\|searchSource} |
+| [getSearchRequestBody()](./kibana-plugin-plugins-data-public.searchsource.getsearchrequestbody.md) | | get resulting DSL |
+| [getSerializedFields()](./kibana-plugin-plugins-data-public.searchsource.getserializedfields.md) | | serializes search source fields (which can later be passed to [ISearchStartSearchSource](./kibana-plugin-plugins-data-public.isearchstartsearchsource.md)) |
+| [onRequestStart(handler)](./kibana-plugin-plugins-data-public.searchsource.onrequeststart.md) | | Add a handler that will be notified whenever requests start |
+| [serialize()](./kibana-plugin-plugins-data-public.searchsource.serialize.md) | | Serializes the instance to a JSON string and a set of referenced objects. Use this method to get a representation of the search source which can be stored in a saved object.The references returned by this function can be mixed with other references in the same object, however make sure there are no name-collisions. The references will be named kibanaSavedObjectMeta.searchSourceJSON.index
and kibanaSavedObjectMeta.searchSourceJSON.filter[<number>].meta.index
.Using createSearchSource
, the instance can be re-created. |
+| [setField(field, value)](./kibana-plugin-plugins-data-public.searchsource.setfield.md) | | sets value to a single search source feild |
+| [setFields(newFields)](./kibana-plugin-plugins-data-public.searchsource.setfields.md) | | internal, dont use overrides all fields with the new field array |
+| [setParent(parent, options)](./kibana-plugin-plugins-data-public.searchsource.setparent.md) | | Set a searchSource that this source should inherit from |
+| [setPreferredSearchStrategyId(searchStrategyId)](./kibana-plugin-plugins-data-public.searchsource.setpreferredsearchstrategyid.md) | | internal, dont use |
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.onrequeststart.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.onrequeststart.md
new file mode 100644
index 0000000000000..a9386ddae44e1
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.onrequeststart.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [onRequestStart](./kibana-plugin-plugins-data-public.searchsource.onrequeststart.md)
+
+## SearchSource.onRequestStart() method
+
+Add a handler that will be notified whenever requests start
+
+Signature:
+
+```typescript
+onRequestStart(handler: (searchSource: SearchSource, options?: ISearchOptions) => Promise): void;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| handler | (searchSource: SearchSource, options?: ISearchOptions) => Promise<unknown>
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.serialize.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.serialize.md
new file mode 100644
index 0000000000000..73ba8eb66040b
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.serialize.md
@@ -0,0 +1,27 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [serialize](./kibana-plugin-plugins-data-public.searchsource.serialize.md)
+
+## SearchSource.serialize() method
+
+Serializes the instance to a JSON string and a set of referenced objects. Use this method to get a representation of the search source which can be stored in a saved object.
+
+The references returned by this function can be mixed with other references in the same object, however make sure there are no name-collisions. The references will be named `kibanaSavedObjectMeta.searchSourceJSON.index` and `kibanaSavedObjectMeta.searchSourceJSON.filter[].meta.index`.
+
+Using `createSearchSource`, the instance can be re-created.
+
+Signature:
+
+```typescript
+serialize(): {
+ searchSourceJSON: string;
+ references: import("../../../../../core/public").SavedObjectReference[];
+ };
+```
+Returns:
+
+`{
+ searchSourceJSON: string;
+ references: import("../../../../../core/public").SavedObjectReference[];
+ }`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setfield.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setfield.md
new file mode 100644
index 0000000000000..22619940f1589
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setfield.md
@@ -0,0 +1,25 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [setField](./kibana-plugin-plugins-data-public.searchsource.setfield.md)
+
+## SearchSource.setField() method
+
+sets value to a single search source feild
+
+Signature:
+
+```typescript
+setField(field: K, value: SearchSourceFields[K]): this;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| field | K
| |
+| value | SearchSourceFields[K]
| |
+
+Returns:
+
+`this`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setfields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setfields.md
new file mode 100644
index 0000000000000..d0ab63b128954
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setfields.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [setFields](./kibana-plugin-plugins-data-public.searchsource.setfields.md)
+
+## SearchSource.setFields() method
+
+internal, dont use overrides all fields with the new field array
+
+Signature:
+
+```typescript
+setFields(newFields: SearchSourceFields): this;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| newFields | SearchSourceFields
| |
+
+Returns:
+
+`this`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setparent.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setparent.md
new file mode 100644
index 0000000000000..19bf10bec210f
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setparent.md
@@ -0,0 +1,25 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [setParent](./kibana-plugin-plugins-data-public.searchsource.setparent.md)
+
+## SearchSource.setParent() method
+
+Set a searchSource that this source should inherit from
+
+Signature:
+
+```typescript
+setParent(parent?: ISearchSource, options?: SearchSourceOptions): this;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| parent | ISearchSource
| |
+| options | SearchSourceOptions
| |
+
+Returns:
+
+`this`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setpreferredsearchstrategyid.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setpreferredsearchstrategyid.md
new file mode 100644
index 0000000000000..e3261873ba104
--- /dev/null
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsource.setpreferredsearchstrategyid.md
@@ -0,0 +1,24 @@
+
+
+[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [SearchSource](./kibana-plugin-plugins-data-public.searchsource.md) > [setPreferredSearchStrategyId](./kibana-plugin-plugins-data-public.searchsource.setpreferredsearchstrategyid.md)
+
+## SearchSource.setPreferredSearchStrategyId() method
+
+internal, dont use
+
+Signature:
+
+```typescript
+setPreferredSearchStrategyId(searchStrategyId: string): void;
+```
+
+## Parameters
+
+| Parameter | Type | Description |
+| --- | --- | --- |
+| searchStrategyId | string
| |
+
+Returns:
+
+`void`
+
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.aggs.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.aggs.md
index 743646708b4c6..f6bab8e424857 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.aggs.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.aggs.md
@@ -4,6 +4,8 @@
## SearchSourceFields.aggs property
+[AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.filter.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.filter.md
index a14d33420a22d..5fd615cc647d2 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.filter.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.filter.md
@@ -4,6 +4,8 @@
## SearchSourceFields.filter property
+[Filter](./kibana-plugin-plugins-data-public.filter.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.index.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.index.md
index fa1d1a552a560..cf1b1cfa253fd 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.index.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.index.md
@@ -4,6 +4,7 @@
## SearchSourceFields.index property
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.md
index 7a64af0f8b2b8..d19f1da439cee 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.md
@@ -4,6 +4,8 @@
## SearchSourceFields interface
+search source fields
+
Signature:
```typescript
@@ -14,17 +16,17 @@ export interface SearchSourceFields
| Property | Type | Description |
| --- | --- | --- |
-| [aggs](./kibana-plugin-plugins-data-public.searchsourcefields.aggs.md) | any
| |
+| [aggs](./kibana-plugin-plugins-data-public.searchsourcefields.aggs.md) | any
| [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) |
| [fields](./kibana-plugin-plugins-data-public.searchsourcefields.fields.md) | NameList
| |
-| [filter](./kibana-plugin-plugins-data-public.searchsourcefields.filter.md) | Filter[] | Filter | (() => Filter[] | Filter | undefined)
| |
+| [filter](./kibana-plugin-plugins-data-public.searchsourcefields.filter.md) | Filter[] | Filter | (() => Filter[] | Filter | undefined)
| [Filter](./kibana-plugin-plugins-data-public.filter.md) |
| [from](./kibana-plugin-plugins-data-public.searchsourcefields.from.md) | number
| |
| [highlight](./kibana-plugin-plugins-data-public.searchsourcefields.highlight.md) | any
| |
| [highlightAll](./kibana-plugin-plugins-data-public.searchsourcefields.highlightall.md) | boolean
| |
| [index](./kibana-plugin-plugins-data-public.searchsourcefields.index.md) | IndexPattern
| |
-| [query](./kibana-plugin-plugins-data-public.searchsourcefields.query.md) | Query
| |
+| [query](./kibana-plugin-plugins-data-public.searchsourcefields.query.md) | Query
| [Query](./kibana-plugin-plugins-data-public.query.md) |
| [searchAfter](./kibana-plugin-plugins-data-public.searchsourcefields.searchafter.md) | EsQuerySearchAfter
| |
| [size](./kibana-plugin-plugins-data-public.searchsourcefields.size.md) | number
| |
-| [sort](./kibana-plugin-plugins-data-public.searchsourcefields.sort.md) | EsQuerySortValue | EsQuerySortValue[]
| |
+| [sort](./kibana-plugin-plugins-data-public.searchsourcefields.sort.md) | EsQuerySortValue | EsQuerySortValue[]
| [EsQuerySortValue](./kibana-plugin-plugins-data-public.esquerysortvalue.md) |
| [source](./kibana-plugin-plugins-data-public.searchsourcefields.source.md) | NameList
| |
| [terminate\_after](./kibana-plugin-plugins-data-public.searchsourcefields.terminate_after.md) | number
| |
| [timeout](./kibana-plugin-plugins-data-public.searchsourcefields.timeout.md) | string
| |
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.query.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.query.md
index 687dafce798d1..661ce94a06afb 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.query.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.query.md
@@ -4,6 +4,8 @@
## SearchSourceFields.query property
+[Query](./kibana-plugin-plugins-data-public.query.md)
+
Signature:
```typescript
diff --git a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.sort.md b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.sort.md
index c10f556cef6d6..32f513378e35e 100644
--- a/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.sort.md
+++ b/docs/development/plugins/data/public/kibana-plugin-plugins-data-public.searchsourcefields.sort.md
@@ -4,6 +4,8 @@
## SearchSourceFields.sort property
+[EsQuerySortValue](./kibana-plugin-plugins-data-public.esquerysortvalue.md)
+
Signature:
```typescript
diff --git a/src/plugins/data/common/search/aggs/types.ts b/src/plugins/data/common/search/aggs/types.ts
index dabd653463d4f..aec3dcc9d068c 100644
--- a/src/plugins/data/common/search/aggs/types.ts
+++ b/src/plugins/data/common/search/aggs/types.ts
@@ -93,7 +93,7 @@ export interface AggsCommonStart {
* is only used internally. The difference is that AggsStart includes the
* typings for the registry with initialized agg types.
*
- * @internal
+ * @public
*/
export type AggsStart = Assign;
diff --git a/src/plugins/data/public/index.ts b/src/plugins/data/public/index.ts
index 553ee6bde5f2d..5038af9409316 100644
--- a/src/plugins/data/public/index.ts
+++ b/src/plugins/data/public/index.ts
@@ -172,7 +172,7 @@ import {
} from '../common/field_formats';
import { DateNanosFormat, DateFormat } from './field_formats';
-export { baseFormattersPublic } from './field_formats';
+export { baseFormattersPublic, FieldFormatsStart } from './field_formats';
// Field formats helpers namespace:
export const fieldFormats = {
@@ -276,6 +276,7 @@ export {
QuerySuggestionGetFnArgs,
QuerySuggestionBasic,
QuerySuggestionField,
+ AutocompleteStart,
} from './autocomplete';
/*
@@ -313,6 +314,7 @@ import {
export {
// aggs
+ AggConfigSerialized,
AggGroupLabels,
AggGroupName,
AggGroupNames,
@@ -337,6 +339,8 @@ export {
TabbedTable,
} from '../common';
+export type { AggConfigs, AggConfig } from '../common';
+
export {
// search
ES_SEARCH_STRATEGY,
@@ -350,6 +354,9 @@ export {
IKibanaSearchResponse,
injectSearchSourceReferences,
ISearch,
+ ISearchSetup,
+ ISearchStart,
+ ISearchStartSearchSource,
ISearchGeneric,
ISearchSource,
parseSearchSourceJSON,
@@ -365,6 +372,8 @@ export {
EsRawResponseExpressionTypeDefinition,
} from './search';
+export type { SearchSource } from './search';
+
export { ISearchOptions } from '../common';
// Search namespace
@@ -430,8 +439,11 @@ export {
TimefilterContract,
TimeHistoryContract,
QueryStateChange,
+ QueryStart,
} from './query';
+export { AggsStart } from './search/aggs';
+
export {
getTime,
// kbn field types
@@ -455,7 +467,13 @@ export function plugin(initializerContext: PluginInitializerContext[];
+ // (undocumented)
+ getField(): any;
+ // (undocumented)
+ getFieldDisplayName(): any;
+ // (undocumented)
+ getIndexPattern(): import("../../../public").IndexPattern;
+ // (undocumented)
+ getKey(bucket: any, key?: string): any;
+ // (undocumented)
+ getParam(key: string): any;
+ // (undocumented)
+ getRequestAggs(): AggConfig[];
+ // (undocumented)
+ getResponseAggs(): AggConfig[];
+ // (undocumented)
+ getTimeRange(): import("../../../public").TimeRange | undefined;
+ // (undocumented)
+ getValue(bucket: any): any;
+ // (undocumented)
+ id: string;
+ // (undocumented)
+ isFilterable(): boolean;
+ // (undocumented)
+ makeLabel(percentageMode?: boolean): any;
+ static nextId(list: IAggConfig[]): number;
+ onSearchRequestStart(searchSource: ISearchSource_2, options?: ISearchOptions): Promise | Promise;
+ // (undocumented)
+ params: any;
+ // Warning: (ae-incompatible-release-tags) The symbol "parent" is marked as @public, but its signature references "IAggConfigs" which is marked as @internal
+ //
+ // (undocumented)
+ parent?: IAggConfigs;
+ // (undocumented)
+ schema?: string;
+ // Warning: (ae-incompatible-release-tags) The symbol "serialize" is marked as @public, but its signature references "AggConfigSerialized" which is marked as @internal
+ //
+ // (undocumented)
+ serialize(): AggConfigSerialized;
+ setParams(from: any): void;
+ // (undocumented)
+ setType(type: IAggType): void;
+ // Warning: (ae-incompatible-release-tags) The symbol "toDsl" is marked as @public, but its signature references "IAggConfigs" which is marked as @internal
+ toDsl(aggConfigs?: IAggConfigs): any;
+ // (undocumented)
+ toExpressionAst(): ExpressionAstFunction | undefined;
+ // Warning: (ae-incompatible-release-tags) The symbol "toJSON" is marked as @public, but its signature references "AggConfigSerialized" which is marked as @internal
+ //
+ // @deprecated (undocumented)
+ toJSON(): AggConfigSerialized;
+ // Warning: (ae-forgotten-export) The symbol "SerializableState" needs to be exported by the entry point index.d.ts
+ toSerializedFieldFormat(): {} | Ensure, SerializableState>;
+ // (undocumented)
+ get type(): IAggType;
+ set type(type: IAggType);
+ // Warning: (ae-incompatible-release-tags) The symbol "write" is marked as @public, but its signature references "IAggConfigs" which is marked as @internal
+ //
+ // (undocumented)
+ write(aggs?: IAggConfigs): Record;
+}
+
+// Warning: (ae-incompatible-release-tags) The symbol "AggConfigOptions" is marked as @public, but its signature references "AggConfigSerialized" which is marked as @internal
// Warning: (ae-missing-release-tag) "AggConfigOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -92,6 +175,76 @@ export type AggConfigOptions = Assign;
+// Warning: (ae-missing-release-tag) "AggConfigs" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+//
+// @public (undocumented)
+export class AggConfigs {
+ // Warning: (ae-forgotten-export) The symbol "AggConfigsOptions" needs to be exported by the entry point index.d.ts
+ constructor(indexPattern: IndexPattern, configStates: Pick & Pick<{
+ type: string | IAggType;
+ }, "type"> & Pick<{
+ type: string | IAggType;
+ }, never>, "enabled" | "type" | "schema" | "id" | "params">[] | undefined, opts: AggConfigsOptions);
+ // (undocumented)
+ aggs: IAggConfig[];
+ // (undocumented)
+ byId(id: string): AggConfig | undefined;
+ // (undocumented)
+ byIndex(index: number): AggConfig;
+ // (undocumented)
+ byName(name: string): AggConfig[];
+ // (undocumented)
+ bySchemaName(schema: string): AggConfig[];
+ // (undocumented)
+ byType(type: string): AggConfig[];
+ // (undocumented)
+ byTypeName(type: string): AggConfig[];
+ // (undocumented)
+ clone({ enabledOnly }?: {
+ enabledOnly?: boolean | undefined;
+ }): AggConfigs;
+ // Warning: (ae-forgotten-export) The symbol "CreateAggConfigParams" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ createAggConfig: (params: CreateAggConfigParams, { addToAggConfigs }?: {
+ addToAggConfigs?: boolean | undefined;
+ }) => T;
+ // (undocumented)
+ getAll(): AggConfig[];
+ // (undocumented)
+ getRequestAggById(id: string): AggConfig | undefined;
+ // (undocumented)
+ getRequestAggs(): AggConfig[];
+ getResponseAggById(id: string): AggConfig | undefined;
+ getResponseAggs(): AggConfig[];
+ // (undocumented)
+ indexPattern: IndexPattern;
+ jsonDataEquals(aggConfigs: AggConfig[]): boolean;
+ // (undocumented)
+ onSearchRequestStart(searchSource: ISearchSource_2, options?: ISearchOptions_2): Promise<[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]>;
+ // (undocumented)
+ setTimeRange(timeRange: TimeRange): void;
+ // (undocumented)
+ timeRange?: TimeRange;
+ // (undocumented)
+ toDsl(hierarchical?: boolean): Record;
+ }
+
+// @internal (undocumented)
+export type AggConfigSerialized = Ensure<{
+ type: string;
+ enabled?: boolean;
+ id?: string;
+ params?: {} | SerializableState;
+ schema?: string;
+}, SerializableState>;
+
// Warning: (ae-missing-release-tag) "AggGroupLabels" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -127,8 +280,6 @@ export type AggParam = BaseParamType;
export interface AggParamOption {
// (undocumented)
display: string;
- // Warning: (ae-forgotten-export) The symbol "AggConfig" needs to be exported by the entry point index.d.ts
- //
// (undocumented)
enabled?(agg: AggConfig): boolean;
// (undocumented)
@@ -142,10 +293,19 @@ export class AggParamType extends Ba
constructor(config: Record);
// (undocumented)
allowedAggs: string[];
+ // Warning: (ae-incompatible-release-tags) The symbol "makeAgg" is marked as @public, but its signature references "AggConfigSerialized" which is marked as @internal
+ //
// (undocumented)
makeAgg: (agg: TAggConfig, state?: AggConfigSerialized) => TAggConfig;
}
+// Warning: (ae-forgotten-export) The symbol "AggsCommonStart" needs to be exported by the entry point index.d.ts
+//
+// @public
+export type AggsStart = Assign;
+
// Warning: (ae-missing-release-tag) "ApplyGlobalFilterActionContext" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -160,6 +320,11 @@ export interface ApplyGlobalFilterActionContext {
timeFieldName?: string;
}
+// Warning: (ae-forgotten-export) The symbol "AutocompleteService" needs to be exported by the entry point index.d.ts
+//
+// @public (undocumented)
+export type AutocompleteStart = ReturnType;
+
// Warning: (ae-forgotten-export) The symbol "DateFormat" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "DateNanosFormat" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "baseFormattersPublic" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -200,7 +365,6 @@ export enum BUCKET_TYPES {
// @public
export const castEsToKbnFieldTypeName: (esType: ES_FIELD_TYPES | string) => KBN_FIELD_TYPES;
-// Warning: (ae-forgotten-export) The symbol "QueryStart" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "QuerySetup" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "BaseStateContainer" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "connectToQueryState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
@@ -227,7 +391,7 @@ export type CustomFilter = Filter & {
// Warning: (ae-missing-release-tag) "DataPublicPluginSetup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
-// @public (undocumented)
+// @public
export interface DataPublicPluginSetup {
// Warning: (ae-forgotten-export) The symbol "DataPublicPluginEnhancements" needs to be exported by the entry point index.d.ts
//
@@ -243,42 +407,47 @@ export interface DataPublicPluginSetup {
fieldFormats: FieldFormatsSetup;
// (undocumented)
query: QuerySetup;
- // Warning: (ae-forgotten-export) The symbol "ISearchSetup" needs to be exported by the entry point index.d.ts
- //
// (undocumented)
search: ISearchSetup;
}
// Warning: (ae-missing-release-tag) "DataPublicPluginStart" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
-// @public (undocumented)
+// @public
export interface DataPublicPluginStart {
- // (undocumented)
- actions: {
- createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
- createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
- };
- // Warning: (ae-forgotten-export) The symbol "AutocompleteStart" needs to be exported by the entry point index.d.ts
- //
- // (undocumented)
+ actions: DataPublicPluginStartActions;
autocomplete: AutocompleteStart;
- // Warning: (ae-forgotten-export) The symbol "FieldFormatsStart" needs to be exported by the entry point index.d.ts
- //
- // (undocumented)
fieldFormats: FieldFormatsStart;
- // (undocumented)
indexPatterns: IndexPatternsContract;
- // (undocumented)
query: QueryStart;
- // Warning: (ae-forgotten-export) The symbol "ISearchStart" needs to be exported by the entry point index.d.ts
+ search: ISearchStart;
+ ui: DataPublicPluginStartUi;
+}
+
+// Warning: (ae-missing-release-tag) "DataPublicPluginStartActions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+//
+// @public
+export interface DataPublicPluginStartActions {
+ // Warning: (ae-forgotten-export) The symbol "createFiltersFromRangeSelectAction" needs to be exported by the entry point index.d.ts
//
// (undocumented)
- search: ISearchStart;
+ createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
+ // Warning: (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts
+ //
// (undocumented)
- ui: {
- IndexPatternSelect: React.ComponentType;
- SearchBar: React.ComponentType;
- };
+ createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
+}
+
+// Warning: (ae-missing-release-tag) "DataPublicPluginStartUi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+//
+// @public
+export interface DataPublicPluginStartUi {
+ // Warning: (ae-forgotten-export) The symbol "IndexPatternSelectProps" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ IndexPatternSelect: React.ComponentType;
+ // (undocumented)
+ SearchBar: React.ComponentType;
}
// @public (undocumented)
@@ -595,6 +764,11 @@ export type FieldFormatsContentType = 'html' | 'text';
// @public (undocumented)
export type FieldFormatsGetConfigFn = GetConfigFn;
+// @public (undocumented)
+export type FieldFormatsStart = Omit & {
+ deserialize: FormatFactory;
+};
+
// Warning: (ae-forgotten-export) The symbol "FieldSpec" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "fieldList" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -709,8 +883,6 @@ export function getTime(indexPattern: IIndexPattern | undefined, timeRange: Time
// @public
export type IAggConfig = AggConfig;
-// Warning: (ae-forgotten-export) The symbol "AggConfigs" needs to be exported by the entry point index.d.ts
-//
// @internal
export type IAggConfigs = AggConfigs;
@@ -1231,11 +1403,40 @@ export interface ISearchOptions {
strategy?: string;
}
-// Warning: (ae-forgotten-export) The symbol "SearchSource" needs to be exported by the entry point index.d.ts
+// Warning: (ae-missing-release-tag) "ISearchSetup" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
-// @public (undocumented)
+// @public
+export interface ISearchSetup {
+ // Warning: (ae-forgotten-export) The symbol "SearchEnhancements" needs to be exported by the entry point index.d.ts
+ //
+ // @internal (undocumented)
+ __enhance: (enhancements: SearchEnhancements) => void;
+ // Warning: (ae-forgotten-export) The symbol "AggsSetup" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ aggs: AggsSetup;
+ // Warning: (ae-forgotten-export) The symbol "SearchUsageCollector" needs to be exported by the entry point index.d.ts
+ //
+ // (undocumented)
+ usageCollector?: SearchUsageCollector;
+}
+
+// @public
export type ISearchSource = Pick;
+// @public
+export interface ISearchStart {
+ aggs: AggsStart;
+ search: ISearchGeneric;
+ searchSource: ISearchStartSearchSource;
+}
+
+// @public
+export interface ISearchStartSearchSource {
+ create: (fields?: SearchSourceFields) => Promise;
+ createEmpty: () => ISearchSource;
+}
+
// Warning: (ae-missing-release-tag) "isFilter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
@@ -1450,6 +1651,12 @@ export interface Query {
};
}
+// Warning: (ae-forgotten-export) The symbol "QueryService" needs to be exported by the entry point index.d.ts
+// Warning: (ae-missing-release-tag) "QueryStart" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
+//
+// @public (undocumented)
+export type QueryStart = ReturnType;
+
// Warning: (ae-missing-release-tag) "QueryState" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
@@ -1768,8 +1975,6 @@ export interface SearchInterceptorDeps {
toasts: ToastsSetup;
// (undocumented)
uiSettings: CoreSetup_2['uiSettings'];
- // Warning: (ae-forgotten-export) The symbol "SearchUsageCollector" needs to be exported by the entry point index.d.ts
- //
// (undocumented)
usageCollector?: SearchUsageCollector;
}
@@ -1777,9 +1982,58 @@ export interface SearchInterceptorDeps {
// @internal
export type SearchRequest = Record;
+// @public (undocumented)
+export class SearchSource {
+ // Warning: (ae-forgotten-export) The symbol "SearchSourceDependencies" needs to be exported by the entry point index.d.ts
+ constructor(fields: SearchSourceFields | undefined, dependencies: SearchSourceDependencies);
+ create(): SearchSource;
+ createChild(options?: {}): SearchSource;
+ createCopy(): SearchSource;
+ destroy(): void;
+ fetch(options?: ISearchOptions): Promise>;
+ getField(field: K, recurse?: boolean): SearchSourceFields[K];
+ getFields(): {
+ type?: string | undefined;
+ query?: import("../..").Query | undefined;
+ filter?: Filter | Filter[] | (() => Filter | Filter[] | undefined) | undefined;
+ sort?: Record | Record[] | undefined;
+ highlight?: any;
+ highlightAll?: boolean | undefined;
+ aggs?: any;
+ from?: number | undefined;
+ size?: number | undefined;
+ source?: string | boolean | string[] | undefined;
+ version?: boolean | undefined;
+ fields?: string | boolean | string[] | undefined;
+ index?: import("../..").IndexPattern | undefined;
+ searchAfter?: import("./types").EsQuerySearchAfter | undefined;
+ timeout?: string | undefined;
+ terminate_after?: number | undefined;
+ };
+ getId(): string;
+ getOwnField(field: K): SearchSourceFields[K];
+ getParent(): SearchSource | undefined;
+ getSearchRequestBody(): Promise;
+ getSerializedFields(): SearchSourceFields;
+ // Warning: (ae-incompatible-release-tags) The symbol "history" is marked as @public, but its signature references "SearchRequest" which is marked as @internal
+ //
+ // (undocumented)
+ history: SearchRequest[];
+ onRequestStart(handler: (searchSource: SearchSource, options?: ISearchOptions) => Promise): void;
+ serialize(): {
+ searchSourceJSON: string;
+ references: import("../../../../../core/public").SavedObjectReference[];
+ };
+ setField(field: K, value: SearchSourceFields[K]): this;
+ setFields(newFields: SearchSourceFields): this;
+ // Warning: (ae-forgotten-export) The symbol "SearchSourceOptions" needs to be exported by the entry point index.d.ts
+ setParent(parent?: ISearchSource, options?: SearchSourceOptions): this;
+ setPreferredSearchStrategyId(searchStrategyId: string): void;
+}
+
// Warning: (ae-missing-release-tag) "SearchSourceFields" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
-// @public (undocumented)
+// @public
export interface SearchSourceFields {
// (undocumented)
aggs?: any;
@@ -1793,6 +2047,8 @@ export interface SearchSourceFields {
highlight?: any;
// (undocumented)
highlightAll?: boolean;
+ // Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "kibana" does not have an export "IndexPatternService"
+ //
// (undocumented)
index?: IndexPattern;
// (undocumented)
@@ -1944,6 +2200,8 @@ export const UI_SETTINGS: {
// src/plugins/data/common/es_query/filters/match_all_filter.ts:28:3 - (ae-forgotten-export) The symbol "MatchAllFilterMeta" needs to be exported by the entry point index.d.ts
// src/plugins/data/common/es_query/filters/phrase_filter.ts:33:3 - (ae-forgotten-export) The symbol "PhraseFilterMeta" needs to be exported by the entry point index.d.ts
// src/plugins/data/common/es_query/filters/phrases_filter.ts:31:3 - (ae-forgotten-export) The symbol "PhrasesFilterMeta" needs to be exported by the entry point index.d.ts
+// src/plugins/data/common/search/aggs/types.ts:98:51 - (ae-forgotten-export) The symbol "AggTypesRegistryStart" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/field_formats/field_formats_service.ts:67:3 - (ae-forgotten-export) The symbol "FormatFactory" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:66:23 - (ae-forgotten-export) The symbol "FilterLabel" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:66:23 - (ae-forgotten-export) The symbol "FILTERS" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:66:23 - (ae-forgotten-export) The symbol "getDisplayValueFromFilter" needs to be exported by the entry point index.d.ts
@@ -1976,25 +2234,22 @@ export const UI_SETTINGS: {
// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "getFromSavedObject" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "flattenHitWrapper" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/index.ts:234:27 - (ae-forgotten-export) The symbol "formatHitProvider" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:371:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:371:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:371:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:371:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:373:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:374:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:383:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:384:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:385:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:386:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:390:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:391:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:394:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:395:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/index.ts:398:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:380:20 - (ae-forgotten-export) The symbol "getRequestInspectorStats" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:380:20 - (ae-forgotten-export) The symbol "getResponseInspectorStats" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:380:20 - (ae-forgotten-export) The symbol "tabifyAggResponse" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:380:20 - (ae-forgotten-export) The symbol "tabifyGetColumns" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:382:1 - (ae-forgotten-export) The symbol "CidrMask" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:383:1 - (ae-forgotten-export) The symbol "dateHistogramInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:392:1 - (ae-forgotten-export) The symbol "InvalidEsCalendarIntervalError" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:393:1 - (ae-forgotten-export) The symbol "InvalidEsIntervalFormatError" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:394:1 - (ae-forgotten-export) The symbol "Ipv4Address" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:395:1 - (ae-forgotten-export) The symbol "isDateHistogramBucketAggConfig" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:399:1 - (ae-forgotten-export) The symbol "isValidEsInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:400:1 - (ae-forgotten-export) The symbol "isValidInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:403:1 - (ae-forgotten-export) The symbol "parseInterval" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:404:1 - (ae-forgotten-export) The symbol "propFilter" needs to be exported by the entry point index.d.ts
+// src/plugins/data/public/index.ts:407:1 - (ae-forgotten-export) The symbol "toAbsoluteDates" needs to be exported by the entry point index.d.ts
// src/plugins/data/public/query/state_sync/connect_to_query_state.ts:45:5 - (ae-forgotten-export) The symbol "FilterStateStore" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/types.ts:62:5 - (ae-forgotten-export) The symbol "createFiltersFromValueClickAction" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/types.ts:63:5 - (ae-forgotten-export) The symbol "createFiltersFromRangeSelectAction" needs to be exported by the entry point index.d.ts
-// src/plugins/data/public/types.ts:71:5 - (ae-forgotten-export) The symbol "IndexPatternSelectProps" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
diff --git a/src/plugins/data/public/search/README.md b/src/plugins/data/public/search/README.md
index 33e6d9ab0bd1a..2a3907f5119c3 100644
--- a/src/plugins/data/public/search/README.md
+++ b/src/plugins/data/public/search/README.md
@@ -1,13 +1,23 @@
# search
-The `search` plugin provides the ability to register search strategies that take in a request
-object, and return a response object, of a given shape.
+The `search` service provides you with APIs to query elasticsearch.
-Both client side search strategies can be registered, as well as server side search strategies.
+The services are split into two parts:
-The `search` plugin includes two one concrete client side implementations -
- `SYNC_SEARCH_STRATEGY` and `ES_SEARCH_STRATEGY` which uses `SYNC_SEARCH_STRATEGY`. There is also one
- default server side search strategy, `ES_SEARCH_STRATEGY`.
+# low level API
- Includes the `esSearch` plugin in order to search for data from Elasticsearch using Elasticsearch
-DSL.
+With low level API you work directly with elasticsearch DSL
+
+```typescript
+const results = await data.search.search(request, params);
+```
+
+# high level API
+
+With high level API you work with kibana abstractions around elasticsearch DSL: filters, queries and aggregations.
+
+```typescript
+const search = data.search.searchSource.createEmpty();
+search.setField('query', data.query.queryString);
+const results = await search.fetch();
+```
\ No newline at end of file
diff --git a/src/plugins/data/public/search/index.ts b/src/plugins/data/public/search/index.ts
index a6a1736ac91da..78de402aebe53 100644
--- a/src/plugins/data/public/search/index.ts
+++ b/src/plugins/data/public/search/index.ts
@@ -19,7 +19,7 @@
export * from './expressions';
-export { ISearch, ISearchGeneric, ISearchSetup, ISearchStart, SearchEnhancements } from './types';
+export { ISearch, ISearchGeneric, ISearchSetup, ISearchStart, ISearchStartSearchSource, SearchEnhancements } from './types';
export { IEsSearchResponse, IEsSearchRequest, ES_SEARCH_STRATEGY } from '../../common/search';
diff --git a/src/plugins/data/public/search/search_service.ts b/src/plugins/data/public/search/search_service.ts
index f8f4acbe43dfd..6b73761c5a437 100644
--- a/src/plugins/data/public/search/search_service.ts
+++ b/src/plugins/data/public/search/search_service.ts
@@ -103,7 +103,13 @@ export class SearchService implements Plugin {
aggs: this.aggsService.start({ fieldFormats, uiSettings }),
search,
searchSource: {
+ /**
+ * creates searchsource based on serialized search source fields
+ */
create: createSearchSource(indexPatterns, searchSourceDependencies),
+ /**
+ * creates an enpty search source
+ */
createEmpty: () => {
return new SearchSource({}, searchSourceDependencies);
},
diff --git a/src/plugins/data/public/search/search_source/search_source.ts b/src/plugins/data/public/search/search_source/search_source.ts
index 68c7b663b3628..39dcd460b9ab9 100644
--- a/src/plugins/data/public/search/search_source/search_source.ts
+++ b/src/plugins/data/public/search/search_source/search_source.ts
@@ -143,15 +143,19 @@ export class SearchSource {
* PUBLIC API
*****/
+ /**
+ * internal, dont use
+ * @param searchStrategyId
+ */
setPreferredSearchStrategyId(searchStrategyId: string) {
this.searchStrategyId = searchStrategyId;
}
- setFields(newFields: SearchSourceFields) {
- this.fields = newFields;
- return this;
- }
-
+ /**
+ * sets value to a single search source feild
+ * @param field: field name
+ * @param value: value for the field
+ */
setField(field: K, value: SearchSourceFields[K]) {
if (value == null) {
delete this.fields[field];
@@ -161,16 +165,32 @@ export class SearchSource {
return this;
}
+ /**
+ * internal, dont use
+ * overrides all fields with the new field array
+ * @param newFields
+ */
+ setFields(newFields: SearchSourceFields) {
+ this.fields = newFields;
+ return this;
+ }
+
+ /**
+ * returns search source id
+ */
getId() {
return this.id;
}
+ /**
+ * returns all search source fields
+ */
getFields() {
return { ...this.fields };
}
/**
- * Get fields from the fields
+ * Gets a single field from the fields
*/
getField(field: K, recurse = true): SearchSourceFields[K] {
if (!recurse || this.fields[field] !== void 0) {
@@ -187,10 +207,16 @@ export class SearchSource {
return this.getField(field, false);
}
+ /**
+ * deprecated, don't use
+ */
create() {
return new SearchSource({}, this.dependencies);
}
+ /**
+ * creates a copy of this search source (without its children)
+ */
createCopy() {
const newSearchSource = new SearchSource({}, this.dependencies);
newSearchSource.setFields({ ...this.fields });
@@ -201,6 +227,10 @@ export class SearchSource {
return newSearchSource;
}
+ /**
+ * creates a new child search source
+ * @param options
+ */
createChild(options = {}) {
const childSearchSource = new SearchSource({}, this.dependencies);
childSearchSource.setParent(this, options);
@@ -227,42 +257,6 @@ export class SearchSource {
return this.parent;
}
- /**
- * Run a search using the search service
- * @return {Observable>}
- */
- private fetch$(searchRequest: SearchRequest, options: ISearchOptions) {
- const { search, getConfig } = this.dependencies;
-
- const params = getSearchParamsFromRequest(searchRequest, {
- getConfig,
- });
-
- return search({ params, indexType: searchRequest.indexType }, options).pipe(
- map(({ rawResponse }) => handleResponse(searchRequest, rawResponse))
- );
- }
-
- /**
- * Run a search using the search service
- * @return {Promise>}
- */
- private async legacyFetch(searchRequest: SearchRequest, options: ISearchOptions) {
- const { http, getConfig, loadingCount$ } = this.dependencies;
-
- return await fetchSoon(
- searchRequest,
- {
- ...(this.searchStrategyId && { searchStrategyId: this.searchStrategyId }),
- ...options,
- },
- {
- http,
- config: { get: getConfig },
- loadingCount$,
- }
- );
- }
/**
* Fetch this source and reject the returned Promise on error
*
@@ -301,6 +295,9 @@ export class SearchSource {
this.requestStartHandlers.push(handler);
}
+ /**
+ * get resulting DSL
+ */
async getSearchRequestBody() {
const searchRequest = await this.flatten();
return searchRequest.body;
@@ -318,6 +315,43 @@ export class SearchSource {
* PRIVATE APIS
******/
+ /**
+ * Run a search using the search service
+ * @return {Observable>}
+ */
+ private fetch$(searchRequest: SearchRequest, options: ISearchOptions) {
+ const { search, getConfig } = this.dependencies;
+
+ const params = getSearchParamsFromRequest(searchRequest, {
+ getConfig,
+ });
+
+ return search({ params, indexType: searchRequest.indexType }, options).pipe(
+ map(({ rawResponse }) => handleResponse(searchRequest, rawResponse))
+ );
+ }
+
+ /**
+ * Run a search using the search service
+ * @return {Promise>}
+ */
+ private async legacyFetch(searchRequest: SearchRequest, options: ISearchOptions) {
+ const { http, getConfig, loadingCount$ } = this.dependencies;
+
+ return await fetchSoon(
+ searchRequest,
+ {
+ ...(this.searchStrategyId && { searchStrategyId: this.searchStrategyId }),
+ ...options,
+ },
+ {
+ http,
+ config: { get: getConfig },
+ loadingCount$,
+ }
+ );
+ }
+
/**
* Called by requests of this search source when they are started
* @param options
@@ -480,6 +514,9 @@ export class SearchSource {
return searchRequest;
}
+ /**
+ * serializes search source fields (which can later be passed to {@link ISearchStartSearchSource})
+ */
public getSerializedFields() {
const { filter: originalFilters, ...searchSourceFields } = omit(this.getFields(), [
'sort',
@@ -531,5 +568,8 @@ export class SearchSource {
}
}
-/** @public **/
+/**
+ * search source interface
+ * @public
+ */
export type ISearchSource = Pick;
diff --git a/src/plugins/data/public/search/search_source/types.ts b/src/plugins/data/public/search/search_source/types.ts
index c2f8701a64fa3..0882aa9a2ceec 100644
--- a/src/plugins/data/public/search/search_source/types.ts
+++ b/src/plugins/data/public/search/search_source/types.ts
@@ -34,19 +34,37 @@ export interface SortDirectionNumeric {
export type EsQuerySortValue = Record;
+/**
+ * search source fields
+ */
export interface SearchSourceFields {
type?: string;
+ /**
+ * {@link Query}
+ */
query?: Query;
+ /**
+ * {@link Filter}
+ */
filter?: Filter[] | Filter | (() => Filter[] | Filter | undefined);
+ /**
+ * {@link EsQuerySortValue}
+ */
sort?: EsQuerySortValue | EsQuerySortValue[];
highlight?: any;
highlightAll?: boolean;
+ /**
+ * {@link AggConfigs}
+ */
aggs?: any;
from?: number;
size?: number;
source?: NameList;
version?: boolean;
fields?: NameList;
+ /**
+ * {@link IndexPatternService}
+ */
index?: IndexPattern;
searchAfter?: EsQuerySearchAfter;
timeout?: string;
diff --git a/src/plugins/data/public/search/types.ts b/src/plugins/data/public/search/types.ts
index cec5c63294e96..83a542269046f 100644
--- a/src/plugins/data/public/search/types.ts
+++ b/src/plugins/data/public/search/types.ts
@@ -62,13 +62,42 @@ export interface ISearchSetup {
__enhance: (enhancements: SearchEnhancements) => void;
}
+/**
+ * high level search service
+ * @public
+ */
+export interface ISearchStartSearchSource {
+ /**
+ * creates {@link SearchSource} based on provided serialized {@link SearchSourceFields}
+ * @param fields
+ */
+ create: (fields?: SearchSourceFields) => Promise;
+ /**
+ * creates empty {@link SearchSource}
+ */
+ createEmpty: () => ISearchSource;
+}
+/**
+ * search service
+ * @public
+ */
export interface ISearchStart {
+ /**
+ * agg config sub service
+ * {@link AggsStart}
+ *
+ */
aggs: AggsStart;
+ /**
+ * low level search
+ * {@link ISearchGeneric}
+ */
search: ISearchGeneric;
- searchSource: {
- create: (fields?: SearchSourceFields) => Promise;
- createEmpty: () => ISearchSource;
- };
+ /**
+ * high level search
+ * {@link ISearchStartSearchSource}
+ */
+ searchSource: ISearchStartSearchSource;
}
export { SEARCH_EVENT_TYPE } from './collectors';
diff --git a/src/plugins/data/public/types.ts b/src/plugins/data/public/types.ts
index bffc10642eb47..cf8c4e1c57aa6 100644
--- a/src/plugins/data/public/types.ts
+++ b/src/plugins/data/public/types.ts
@@ -46,6 +46,9 @@ export interface DataStartDependencies {
uiActions: UiActionsStart;
}
+/**
+ * Data plugin public Setup contract
+ */
export interface DataPublicPluginSetup {
autocomplete: AutocompleteSetup;
search: ISearchSetup;
@@ -57,20 +60,61 @@ export interface DataPublicPluginSetup {
__enhance: (enhancements: DataPublicPluginEnhancements) => void;
}
+/**
+ * data plugin prewired UI components
+ */
+export interface DataPublicPluginStartUi {
+ IndexPatternSelect: React.ComponentType;
+ SearchBar: React.ComponentType;
+};
+
+/**
+ * utilities to generate filters from action context
+ */
+export interface DataPublicPluginStartActions {
+ createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
+ createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
+}
+
+/**
+ * Data plugin public Start contract
+ */
export interface DataPublicPluginStart {
- actions: {
- createFiltersFromValueClickAction: typeof createFiltersFromValueClickAction;
- createFiltersFromRangeSelectAction: typeof createFiltersFromRangeSelectAction;
- };
+ /**
+ * filter creation utilities
+ * {@link DataPublicPluginStartActions}
+ */
+ actions: DataPublicPluginStartActions;
+ /**
+ * autocomplete service
+ * {@link AutocompleteStart}
+ */
autocomplete: AutocompleteStart;
+ /**
+ * index patterns service
+ * {@link IndexPatternsContract}
+ */
indexPatterns: IndexPatternsContract;
+ /**
+ * search service
+ * {@link ISearchStart}
+ */
search: ISearchStart;
+ /**
+ * field formats service
+ * {@link FieldFormatsStart}
+ */
fieldFormats: FieldFormatsStart;
+ /**
+ * query service
+ * {@link QueryStart}
+ */
query: QueryStart;
- ui: {
- IndexPatternSelect: React.ComponentType;
- SearchBar: React.ComponentType;
- };
+ /**
+ * prewired ui components
+ * {@link DataPublicPluginStartUi}
+ */
+ ui: DataPublicPluginStartUi;
}
export interface IDataPluginServices extends Partial {