Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into search_pit_resolved…
Browse files Browse the repository at this point in the history
…_indices
  • Loading branch information
jimczi committed Dec 11, 2023
2 parents 3317b31 + edf39cd commit df012d6
Show file tree
Hide file tree
Showing 175 changed files with 3,618 additions and 2,710 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ org.elasticsearch.cluster.ClusterFeatures#allNodeFeatures()
@defaultMessage ClusterFeatures#clusterHasFeature is for internal use only. Use FeatureService#clusterHasFeature to determine if a feature is present on the cluster.
org.elasticsearch.cluster.ClusterFeatures#clusterHasFeature(org.elasticsearch.features.NodeFeature)

@defaultMessage Do not construct this records outside the source files they are declared in
org.elasticsearch.cluster.SnapshotsInProgress$ShardSnapshotStatus#<init>(java.lang.String, org.elasticsearch.cluster.SnapshotsInProgress$ShardState, org.elasticsearch.repositories.ShardGeneration, java.lang.String, org.elasticsearch.repositories.ShardSnapshotResult)
org.elasticsearch.cluster.SnapshotDeletionsInProgress$Entry#<init>(java.lang.String, java.util.List, long, long, org.elasticsearch.cluster.SnapshotDeletionsInProgress$State, java.lang.String)

@defaultMessage Use a Thread constructor with a name, anonymous threads are more difficult to debug
java.lang.Thread#<init>(java.lang.Runnable)
java.lang.Thread#<init>(java.lang.ThreadGroup, java.lang.Runnable)
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,20 @@ public void beforeStart() {
try {
mockServer.start();
node.setting("telemetry.metrics.enabled", "true");
node.setting("tracing.apm.agent.enabled", "true");
node.setting("tracing.apm.agent.transaction_sample_rate", "0.10");
node.setting("tracing.apm.agent.metrics_interval", "10s");
node.setting("tracing.apm.agent.server_url", "http://127.0.0.1:" + mockServer.getPort());
} catch (IOException e) {
logger.warn("Unable to start APM server", e);
}
} else if (node.getSettingKeys().contains("telemetry.metrics.enabled") == false) {
// in serverless metrics are enabled by default
// if metrics were not enabled explicitly for gradlew run we should disable them
}
// in serverless metrics are enabled by default
// if metrics were not enabled explicitly for gradlew run we should disable them
else if (node.getSettingKeys().contains("telemetry.metrics.enabled") == false) { // metrics
node.setting("telemetry.metrics.enabled", "false");
} else if (node.getSettingKeys().contains("tracing.apm.agent.enabled") == false) { // tracing
node.setting("tracing.apm.agent.enable", "false");
}

}
Expand Down
6 changes: 6 additions & 0 deletions docs/changelog/103084.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 103084
summary: Return `matched_queries` in Percolator
area: Percolator
type: enhancement
issues:
- 10163
37 changes: 37 additions & 0 deletions docs/reference/connector/apis/connector-apis.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[[connector-apis]]
== Connector APIs

preview::[]

++++
<titleabbrev>Connector APIs</titleabbrev>
++++

---

The connector and sync jobs API provides a convenient way to create and manage Elastic connectors and sync jobs in an internal index.

This API provides an alternative to relying solely on {kib} UI for connector and sync job management. The API comes with a set of
validations and assertions to ensure that the state representation in the internal index remains valid.

[discrete]
[[elastic-connector-apis]]
=== Connector APIs

You can use these APIs to create, get, delete and update connectors.

Use the following APIs to manage connectors:

* <<create-connector-api>>


[discrete]
[[sync-job-apis]]
=== Sync Job APIs

You can use these APIs to create, cancel, delete and update sync jobs.

Use the following APIs to manage sync jobs:


include::create-connector-api.asciidoc[]
128 changes: 128 additions & 0 deletions docs/reference/connector/apis/create-connector-api.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
[[create-connector-api]]
=== Create connector API
++++
<titleabbrev>Create connector</titleabbrev>
++++

Creates a connector.


[source,console]
--------------------------------------------------
PUT _connector/my-connector
{
"index_name": "search-google-drive",
"name": "My Connector",
"service_type": "google_drive"
}
--------------------------------------------------
////
[source,console]
----
DELETE _connector/my-connector
----
// TEST[continued]
////

[[create-connector-api-request]]
==== {api-request-title}
`POST _connector`

`PUT _connector/<connector_id>`


[[create-connector-api-prereqs]]
==== {api-prereq-title}

* To sync data using connectors, it's essential to have the Elastic connectors service running.
* The `service_type` parameter should reference an existing connector service type.


[[create-connector-api-desc]]
==== {api-description-title}

Creates a connector document in the internal index and initializes its configuration, filtering, and scheduling with default values. These values can be updated later as needed.

[[create-connector-api-path-params]]
==== {api-path-parms-title}

`<connector_id>`::
(Required, string) Unique identifier of a connector.


[role="child_attributes"]
[[create-connector-api-request-body]]
==== {api-request-body-title}

`description`::
(Optional, string) The description of the connector.

`index_name`::
(Required, string) The target index for syncing data by the connector.

`name`::
(Optional, string) The name of the connector.

`is_native`::
(Optional, boolean) Indicates if it's a native connector. Defaults to `false`.

`language`::
(Optional, string) Language analyzer for the data. Limited to supported languages.

`service_type`::
(Optional, string) Connector service type. Can reference Elastic-supported connector types or a custom connector type.


[role="child_attributes"]
[[create-connector-api-response-body]]
==== {api-response-body-title}

`id`::
(string) The ID associated with the connector document. Returned when using a POST request.

`result`::
(string) The result of the indexing operation, `created` or `updated`. Returned when using a PUT request.

[[create-connector-api-response-codes]]
==== {api-response-codes-title}

`200`::
Indicates that an existing connector was updated successfully.

`201`::
Indicates that the connector was created successfully.

`400`::
Indicates that the request was malformed.

[[create-connector-api-example]]
==== {api-examples-title}

[source,console]
----
PUT _connector/my-connector
{
"index_name": "search-google-drive",
"name": "My Connector",
"description": "My Connector to sync data to Elastic index from Google Drive",
"service_type": "google_drive",
"language": "english"
}
----


The API returns the following result:

[source,console-result]
----
{
"result": "created"
}
----
////
[source,console]
----
DELETE _connector/my-connector
----
// TEST[continued]
////
88 changes: 80 additions & 8 deletions docs/reference/esql/functions/binary.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,91 @@
[[esql-binary-operators]]
=== Binary operators

These binary comparison operators are supported:
[[esql-binary-operators-equality]]
==== Equality
[.text-center]
image::esql/functions/signature/equals.svg[Embedded,opts=inline]

Supported types:

include::types/equals.asciidoc[]

==== Inequality `!=`
[.text-center]
image::esql/functions/signature/not_equals.svg[Embedded,opts=inline]

* equality: `==`
* inequality: `!=`
* less than: `<`
* less than or equal: `<=`
* larger than: `>`
* larger than or equal: `>=`
Supported types:

And these mathematical operators are supported:
include::types/not_equals.asciidoc[]

==== Less than `<`
[.text-center]
image::esql/functions/signature/less_than.svg[Embedded,opts=inline]

Supported types:

include::types/less_than.asciidoc[]

==== Less than or equal to `<=`
[.text-center]
image::esql/functions/signature/less_than_or_equal.svg[Embedded,opts=inline]

Supported types:

include::types/less_than_or_equal.asciidoc[]

==== Greater than `>`
[.text-center]
image::esql/functions/signature/greater_than.svg[Embedded,opts=inline]

Supported types:

include::types/greater_than.asciidoc[]

==== Greater than or equal to `>=`
[.text-center]
image::esql/functions/signature/greater_than_or_equal.svg[Embedded,opts=inline]

Supported types:

include::types/greater_than_or_equal.asciidoc[]

==== Add `+`
[.text-center]
image::esql/functions/signature/add.svg[Embedded,opts=inline]

Supported types:

include::types/add.asciidoc[]

==== Subtract `-`
[.text-center]
image::esql/functions/signature/sub.svg[Embedded,opts=inline]

Supported types:

include::types/sub.asciidoc[]

==== Multiply `*`
[.text-center]
image::esql/functions/signature/mul.svg[Embedded,opts=inline]

Supported types:

include::types/mul.asciidoc[]

==== Divide `/`
[.text-center]
image::esql/functions/signature/div.svg[Embedded,opts=inline]

Supported types:

include::types/div.asciidoc[]

==== Modulus `%`
[.text-center]
image::esql/functions/signature/mod.svg[Embedded,opts=inline]

Supported types:

include::types/mod.asciidoc[]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion docs/reference/esql/functions/signature/to_degrees.svg

This file was deleted.

12 changes: 12 additions & 0 deletions docs/reference/esql/functions/types/add.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
date_period | date_period | date_period
date_period | datetime | datetime
datetime | date_period | datetime
datetime | time_duration | datetime
double | double | double
integer | integer | integer
long | long | long
time_duration | time_duration | time_duration
|===
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/types/div.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
double | double | double
integer | integer | integer
long | long | long
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/equals.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/greater_than.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
5 changes: 5 additions & 0 deletions docs/reference/esql/functions/types/less_than.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
integer | integer | boolean
|===
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/types/mod.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
double | double | double
integer | integer | integer
long | long | long
|===
7 changes: 7 additions & 0 deletions docs/reference/esql/functions/types/mul.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
lhs | rhs | result
double | double | double
integer | integer | integer
long | long | long
|===
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[%header.monospaced.styled,format=dsv,separator=|]
|===
v | result
date_period | date_period
double | double
integer | double
long | double
unsigned_long | double
integer | integer
long | long
time_duration | time_duration
|===
Loading

0 comments on commit df012d6

Please sign in to comment.