Commit Graph

3214 Commits

Author SHA1 Message Date
Kathleen DeRusso 258d0cb0be
Automatically map floats as dense vector (#98512) 2023-09-06 16:06:29 -04:00
Carlos Delgado ae50c13ec7
Fix sparse_vector tests for serverlesss (#99241) 2023-09-06 18:01:40 +02:00
Adrien Grand fe2dd4e0ba Merge branch 'main' into lucene_snapshot 2023-09-06 13:29:57 +02:00
Carlos Delgado 6bbf6c2aaf
Bring back sparse_vector mapping (#98996)
Adds back `sparse_vector` field type, as a copy of `rank_features`. 

The main goal is to have the `sparse_vector` field type available so we
can switch ELSER queries to use the new type.
2023-09-06 05:27:14 -04:00
elasticsearchmachine c851e50b3d Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-08-31 10:05:46 +00:00
Benjamin Trent 7b9c367aeb
Auto-normalize dot_product vectors at index & query (#98944)
`dot_product` requires vectors to be unit-length. Previously, we would
check that vectors were unit-length and throw if they were not. 

Instead, we will now auto-normalize vectors as they are indexed.

`cosine` will continue to behave as usual, not normalizing the vectors.

closes: https://github.com/elastic/elasticsearch/issues/98935
2023-08-30 09:50:49 -04:00
elasticsearchmachine 8e4cc06e7e Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-08-25 10:06:24 +00:00
Kostas Krikellas 524ecfb538
Set default index mode for TimeSeries to `null` (#98808)
* Skip segment for MatchNoDocsQuery filters.

When a query of a filter gets rewritten to MatchNoDocsQuery, segments
will not produce any results. We can therefore skip processing such
segments.

This applies to FilterByFilterAggregator and FiltersAggregator, as well
as to TermsAggregator when it uses StringTermsAggregatorFromFilters
internally; the latter is an adapter aggregator to
FilterByFilterAggregator.

Fixes #94637

* Update docs/changelog/98295.yaml

* Check all filters for `MatchNoDocsQuery`.

* Skip optimization when 'other' bucket is requested.

* Revert "Set default index mode for TimeSeries to `null` (#98586)"

This reverts commit 56abb86044.

* Revert "Rollback of #98586 (#98805)"

This reverts commit e370194ac2.

* Skip updating source when missing synthetic mode

* Update docs/changelog/98808.yaml

* Skip matching assert in MapperService too

* Refine the assert

* Extend versions before 8.6, when TS had no synthetic source

* Add source field mapping for non-synthetic TSDB

* Delete 98586.yaml

Duplicate changelog

* Add comment to TSDB_NO_SYNTHETIC mapping

* Spotless fix

* Add yaml test

* Fix version skip in yaml test
2023-08-25 11:24:11 +03:00
elasticsearchmachine 2c6c8058ea Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-08-24 10:05:55 +00:00
Ievgen Degtiarenko 47a590831a
Introduce exist assertion (#98721)
It is common to check is a field exists in the response json (regardless the
value) in yaml tests. Today this is done using `is_true` assertion if the value
is not "0" otherwise assertion is failing and need to be replaced with either
`gte` or `is_false`. This change introduces the `exist` assertion that allows to
 verify the field exists regardless its value.
2023-08-24 08:46:03 +02:00
Dianna Hohensee a25e176692
Add node "roles" to allocation explain response (#98550)
Report node "roles" in the /_cluster/allocation/explain response.
Nodes with limited sets of roles may affect shard distribution in ways
users did not originally consider, so it is helpful to surface this
information along with node allocation decision explanations.
2023-08-23 08:30:35 -04:00
elasticsearchmachine bff4caf8f9 Merge remote-tracking branch 'origin/main' into lucene_snapshot 2023-08-23 10:05:43 +00:00
Lee Hinman 815d596daa
Add 'dataset' size to cat indices and cat shards (#98622)
* Add 'dataset' size to cat indices and cat shards

This adds the `dataset` computed size for the `/_cat/indices` and `/_cat/shards` APIs. This new
column is reported by default.

Resolves #95092
2023-08-22 15:36:32 -06:00
Benjamin Trent 76e5d07827
Fix leaf reader and vector reader overrides (#98688)
* Fix leaf reader and vector reader overrides

* Fix 370_profile knn dfs profiling test
2023-08-22 09:44:22 -04:00
Andrei Dan 01ed7de99f
GA the data stream lifecycle (#98644)
This makes the data stream lifecycle generally available. This will allow
data streams to take advantage of a native simplified and resilient
lifecycle implementation.
2023-08-21 17:28:54 +01:00
Benjamin Trent 34c5bbc52d
Fixing dense vectors bwc tests to reflect new default version (#98621)
New defaults were NOT added for 8.10. They were added for 8.11.

closes: https://github.com/elastic/elasticsearch/issues/98611

relates: https://github.com/elastic/elasticsearch/pull/98268

relates: https://github.com/elastic/elasticsearch/pull/97092
2023-08-17 16:08:55 -04:00
Carlos Delgado 2b838ae853
Dense vector field types are indexed by default (#98268)
* First version

* Spotless, I liked my version better

* Fix param default values

* Add a supplier for default value to ensure it's calculated correctly

* Can't improve this without breaking tests

* Added checks for not specifying a body in PUT requests

* Fix default provider for enum params

* Added yaml test

* Changed docs and fix TODO

* Removing synonyms changes

* Added separate methods for providing default value as suppliers in enums

* Fixed test

* Add a supplier for default value to ensure it's calculated correctly

* Added checks for not specifying a body in PUT requests

* Remove synonyms changes

* Remove some supplier changes

* Better call enumParam with supplier version

* Fix compiler error on supplier

* Apply validators or requires depending on index version

* Solved BWC tests that involved using validators instead of requiresParameters

* Add tests

* Spotless

* Update docs/changelog/98268.yaml

* Update changelog

* Update docs/changelog/98268.yaml

* PR comments

* PR feedback

* Serialize index only for new index versions

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-08-17 10:53:14 -04:00
ChrisHegarty 7cb310b9d0 Merge upstream 2023-08-14 09:55:02 +01:00
Yang Wang d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00
Jim Ferenczi a5d21ce800
Add the total dense vector count in the indices stats output (#98275)
This change adds the total dense vector count to the output of the indices stats.
This is useful for observability in order to track the number of indexed vectors
in a cluster.

---------

Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
2023-08-11 23:17:38 +09:00
Carlos Delgado 2abfa6c06c
Rename Synonyms API namespace (#98383) 2023-08-11 13:47:19 +02:00
ChrisHegarty d07492d712 Merge upstream 2023-08-11 12:10:23 +01:00
Mary Gouseti e71ea6e6d7
Add data stream lifecycle by default (#97823)
In this PR we enable all new data streams to be managed by the data
stream lifecycle by default. This is implemented by adding an empty
`lifecycle: {}` upon new data stream creation. 

Opting out is represented by a the `enabled` flag:

```
{
  "lifecycle": {
    "enabled": false
  }
}
```

This change has the following implications on when is an index managed
and by which feature:

| Parent data stream lifecycle| ILM| `prefer_ilm`|Managed by|
|----------------------------|----|----------------|-| | default | yes|
true| ILM| | default | yes| false| data stream lifecycle| |default |
no|true/false|data stream lifecycle| |opt-out or
missing|yes|true/false|ILM| |opt-out or missing|no|true/false|unmanaged|

Data streams that have been created before the data stream lifecycle is
enabled will not have the default lifecycle.

Next steps: - We need to document this when the feature will be GA
(https://github.com/elastic/elasticsearch/issues/97973).
2023-08-11 06:28:37 -04:00
ChrisHegarty 1e53a5346a Merge branch 'main' into feature/esql 2023-08-10 11:35:15 +01:00
Jim Ferenczi f93351c991
Fix highlighting with synthetic source bwc tests (#98308)
Fix bwc tests broken by #96068
2023-08-09 19:00:43 +09:00
Carlos Delgado 727d0fad02
Synonyms bugfix - prevent index not found when system index has not been created (#98280) 2023-08-09 08:55:20 +02:00
Jim Ferenczi 28a504d7a1
Use the Weight#matches mode for highlighting by default (#96068)
This PR adapts the unified highlighter to use the Weight#matches mode by default when possible.
This is the default mode in Lucene for some time now. For cases where the matches mode won't work (nested and parent-child queries),
 the matches mode is disabled automatically.
I didn't expose an  option to explicitly disable this mode because that should be seen as an internal implementation detail.
With this change, matches that span multiple terms are highlighted together (something that users asked for years) and the clauses that don't match the document are ignored.
2023-08-09 10:44:38 +09:00
elasticsearchmachine 3ccdab8da4 Merge pull request ESQL-1553 from elastic/main
🤖 ESQL: Merge upstream
2023-08-08 13:19:23 -04:00
Salvatore Campagna d0b2f650df
Enable all remaining metric aggregations on counters (#97974)
Here we enable aggregations previously not allowed on fields of type counter.
The decision of enabling such aggregations even if the result is "meaningless"
for counters has been taken to favour TSDB adoption.

Aggregations now allowed, other than the existing ones, include:
* avg
* box plot
* cardinality
* extended stats
* median absolute deviation
* percentile ranks
* percentiles
* stats
* sum
* value count

I included tests for the weighted average and matrix stats aggregations too.

Resolves #97882
2023-08-08 17:47:47 +02:00
elasticsearchmachine 6ff458b3bf Merge pull request ESQL-1530 from elastic/main
🤖 ESQL: Merge upstream
2023-08-03 13:23:09 -04:00
Jill Guyonnet 963a0ae712
[Fleet] Make `.fleet-secrets` index internal (#97728)
* WIP - endpoints skeleton

* Remove allowed origins

* WIP API implementation + tests

* Spotless Java

* WIP IT tests

* Define cluster privileges

* Test

* Fixes

* Check

* Fix

* Fix clients

* More fixes

* Fix IT test

* Fix DELETE

* Add rest-api-spec files

* Remove doc files

* WIP yaml REST tests

* Fix yaml REST tests

* Missing test case

* added missing @ServerlessScope

* renamed apis to singular

* Removed immediate refresh policy

* updated tests

* fix formatting

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Julia Bardi <julia.bardi@elastic.co>
2023-08-03 15:45:45 +02:00
elasticsearchmachine 04908b9e15 Merge pull request ESQL-1527 from elastic/main
🤖 ESQL: Merge upstream
2023-08-03 01:18:46 -04:00
Athena Brown 2ffef2f658
Add an API for managing the settings of Security system indices (#97630)
This PR adds an API similar to #95342 for managing settings
of system indices.

Example calls:

```
GET /_security/settings

PUT /_security/settings
{
    "security": {
        "index.auto_expand_replicas": "0-all"
    },
    "security_tokens": {
            "index.auto_expand_replicas": "0-all"
    },
    "security_profile": {
            "index.auto_expand_replicas": "0-all"
    }
}
```
2023-08-02 16:27:48 -06:00
elasticsearchmachine 2139472efa Merge pull request ESQL-1522 from elastic/main
🤖 ESQL: Merge upstream
2023-08-02 01:20:35 -04:00
Carlos Delgado 6234b3a98c
Refactored responses for updating synonym sets / synonym rules (#98095) 2023-08-01 19:53:52 +02:00
elasticsearchmachine 593849aea3 Merge pull request ESQL-1517 from elastic/main
🤖 ESQL: Merge upstream
2023-08-01 13:17:51 -04:00
Carlos Delgado 970685321f
Synonyms APIs - Synonyms Sets documentation (#98015) 2023-08-01 11:17:50 +02:00
elasticsearchmachine 4178416188 Merge pull request ESQL-1485 from elastic/main
🤖 ESQL: Merge upstream
2023-07-26 13:27:34 -04:00
Carlos Delgado 375991d974
Remove synonyms feature flag and related classes (#97962) 2023-07-26 18:13:06 +02:00
elasticsearchmachine 659931a947 Merge pull request ESQL-1475 from elastic/main
🤖 ESQL: Merge upstream
2023-07-25 13:16:39 -04:00
Bogdan Pintea 5aa1feb63f Add `_query` endpoint as `_esql` replacement (ESQL-1463)
This adds a new ES|QL endpoint, `_query`, to replace the now deprecated
`_esql`. The latter is still kept for a while, emitting a deprecation
warning.

Fixes ESQL-1379.
2023-07-25 12:25:38 +02:00
Iraklis Psaroudakis 743e3bdeeb
Minimum refresh_interval for stateless (#97880)
Fixes ES-6244
2023-07-25 11:37:58 +03:00
elasticsearchmachine 0e7eae2cf3 Merge pull request ESQL-1456 from elastic/main
🤖 ESQL: Merge upstream
2023-07-19 01:20:09 -04:00
Jack Conradson ab65e6f15e
Fix `sub_searches` serialization bug (#97587)
We have allowed hybrid search since 8.4. This means the internal changes for sub_searches must be 
able to write a compound query as early as 8.4, but currently we only do that back to 8.8. This change 
fixes that issue.

Closes ##97144
2023-07-18 13:48:02 -07:00
elasticsearchmachine 8c1b161bf7 Merge pull request ESQL-1449 from elastic/main
🤖 ESQL: Merge upstream
2023-07-17 13:23:01 -04:00
Mayya Sharipova f8c626f792
Track max_score in collapse when requested (#97703)
Before we used to track max_score in collapse when requested (track_scores=true)
or when there is no sort in collapse (see PR#27122). But this feature
was lost through refactoring and changes.

This PR restores this feature.

Closes #97653
2023-07-17 06:48:00 -04:00
elasticsearchmachine a77f3faa62 Merge pull request ESQL-1444 from elastic/main
🤖 ESQL: Merge upstream
2023-07-15 13:20:57 -04:00
Carlos Delgado a5a7525e48
Synonyms - Prevent Synonym Set Delete when indices are using it (#97622) 2023-07-14 20:35:13 +02:00
elasticsearchmachine 850139a946 Merge pull request ESQL-1435 from elastic/main
🤖 ESQL: Merge upstream
2023-07-13 13:18:20 -04:00
Mayya Sharipova 321110ef52
Add synonyms feature for test clusters (#97658)
Fix for #97334 where incorrect feature name was provided.


Correct more instances of synonyms_feature_flag_enabled for synonyms_api_feature_flag_enabled


Closes #96641, #97177
2023-07-13 11:34:25 -04:00
Carlos Delgado 2412adf0fa
Fix synonyms API analyzers reloading (#97621) 2023-07-13 14:28:28 +02:00
elasticsearchmachine 528b883add Merge pull request ESQL-1433 from elastic/main
🤖 ESQL: Merge upstream
2023-07-13 01:22:45 -04:00
Kathleen DeRusso 1365b0df61
Enable Query Rules as technical preview (#97466)
Co-authored-by: Carlos Delgado <6339205+carlosdelest@users.noreply.github.com>
2023-07-12 16:04:59 -04:00
elasticsearchmachine f00a6219d1 Merge pull request ESQL-1428 from elastic/main
🤖 ESQL: Merge upstream
2023-07-12 13:21:28 -04:00
eyalkoren 3d36b08d28
Fix `fields` API with `subobjects: false` (#97092) 2023-07-12 11:35:18 +03:00
Carlos Delgado a1c229a854
Synonyms API - allow empty rulesests (#97458) 2023-07-12 10:30:29 +02:00
elasticsearchmachine 46a2cab5f2 Merge pull request ESQL-1407 from elastic/main
🤖 ESQL: Merge upstream
2023-07-10 13:21:21 -04:00
Carlos Delgado d60e698f0d
Synonyms - Fixes error when no ID is specified (#97426) 2023-07-10 08:44:30 +02:00
Costin Leau 1f77e2ba56 Merge commit '6d45c57b8fc6d504fdc28f355c6db22ac811e629' into esql/lang 2023-07-08 15:53:01 +03:00
Pooya Salehi 34eb74fa23
Do not use auto_expand_replica in mget yaml rest tests (#97427)
As described in the issue, the change in #96763
has made the MixedClusterClientYamlTestSuiteIT for mget fail very
often. For now, let's take the same approach that we have for get.

Closes #97236
2023-07-07 14:44:36 +02:00
Carlos Delgado 86cc92a447
Synonyms API - Delete synonym rule (#97371) 2023-07-07 09:16:01 +02:00
elasticsearchmachine f294be3caf Merge pull request ESQL-1369 from elastic/main
🤖 ESQL: Merge upstream
2023-07-05 13:18:40 -04:00
Mary Gouseti a432313ff3
Data stream lifecycle class names (#97381) 2023-07-05 12:28:32 +03:00
elasticsearchmachine 882b4d8d83 Merge pull request ESQL-1362 from elastic/main
🤖 ESQL: Merge upstream
2023-07-03 16:42:52 -04:00
Mayya Sharipova b294348f10
Add synonyms feature for test clusters (#97334)
For snapshots builds we automatically enable all feature flags,
but for release builds they need to be explicitly added to
test clusters for tests.
This PR does it for synonyms feature.

Closes #96641, #97177
2023-07-03 15:33:54 -04:00
elasticsearchmachine c0fa87eed4 Merge pull request ESQL-1341 from elastic/main
🤖 ESQL: Merge upstream
2023-06-29 13:32:25 -04:00
Martijn van Groningen 9e4fb44a19
Improve error message when aggregation doesn't support counter field (#93545)
A number of aggregations don't support counter fields,
because its computation doesn't make sense on these fields.
For example computing an average on a counter doesn't make
sense.

Relates to #93539
2023-06-29 09:18:41 +02:00
elasticsearchmachine a10223cc99 Merge pull request ESQL-1337 from elastic/main
🤖 ESQL: Merge upstream
2023-06-28 13:16:49 -04:00
Christoph Büscher 8407e978c8
Mute some knn yml tests (#97191) 2023-06-28 16:23:35 +02:00
Mary Gouseti 1abd51b167
Start with data stream lifecycle documentation (#95326) 2023-06-28 16:18:05 +03:00
elasticsearchmachine a4c4f77205 Merge pull request ESQL-1323 from elastic/main
🤖 ESQL: Merge upstream
2023-06-26 13:22:25 -04:00
David Turner 87421f2d27
Add node.roles to cat allocation API (#96994)
`GET _cat/allocation` is a useful way to get a high-level view of the
balance of a cluster, but clusters are only balanced within each data
tier and today this API does not expose node roles. This commit adds an
optional `node.role` column to this API.
2023-06-26 05:23:57 -04:00
elasticsearchmachine 4030a5ef79 Merge pull request ESQL-1319 from elastic/main
🤖 ESQL: Merge upstream
2023-06-25 01:23:41 -04:00
Michael Peterson afbf1f5ca1
Profile API should show node details as well as shard details (#96396)
Added additional fields to SearchProfileResults for XContent output: node_id, cluster, index, shard_id.
It parses the existing composite ID using the new parseProfileShardId method, which reverses
the SeachShardTarget.toString method.

No new information is added here, merely the splitting out of the four pieces of information
in the profile shards "composite" id that is created by the SeachShardTarget.toString method.

Profile/shards output now has the form:
```
  "profile": {
    "shards": [
      {
        "id": "[2m7SW9oIRrirdrwirM1mwQ][blogs][0]",
        "node_id": "2m7SW9oIRrirdrwirM1mwQ",
        "shard_id": "0",
        "index": "blogs",
        "cluster": "(local)",
        "searches": [ ... ]
        ...
      },
      {
        "id": "[UngEVXTBQL-7w5j_tftGAQ][remote1:blogs][2]",
        "node_id": "UngEVXTBQL-7w5j_tftGAQ",
        "shard_id": "2",
        "index": "blogs",
        "cluster": "remote1",
        "searches": [ ... ]
        ...
```

where the latter is on a remote cluster and you can see that as the prefix on the index name.

Partially addresses #25896

Added yamlRestTest for the new fields in the profile response.
2023-06-24 14:12:25 -04:00
elasticsearchmachine 935e377a96 Merge pull request ESQL-1310 from elastic/main
🤖 ESQL: Merge upstream
2023-06-22 15:35:19 -04:00
elasticsearchmachine 7b664ea581 Merge pull request ESQL-1309 from elastic/main
🤖 ESQL: Merge upstream
2023-06-22 13:17:01 -04:00
Mayya Sharipova 11a3104a8c
Auto-reload analyzers for specific resource (#96986)
This PR adds a new optional parameter "resource" for ReloadAnalyzersRequest.
If used, only analyzers that use this specific "resource" will be reload.
This parameter is not documented, for internal use only.

PR #96886 introduced auto-reload of analyzers on synonyms index change. The problem
was that reloading was applied broadly for all indices that contained reloadable
analyzers. This PR improves this, so when a particular synonyms set changes,
only analyzers that use this synonyms set  will auto-reloaded. Note that shard
requests will still be sent to all indices shards, as only on a shard we can
decide if analyzers need to be reloaded.
2023-06-22 13:09:45 -04:00
Carlos Delgado a43af3e194
Synonyms API - Get Synonym Rule (#96985) 2023-06-22 18:55:47 +02:00
Kathleen DeRusso f5c4af547e
Add List Query Rulesets API Call (#96964) 2023-06-22 08:40:46 -04:00
elasticsearchmachine b9fe7e7e9f Merge pull request ESQL-1299 from elastic/main
🤖 ESQL: Merge upstream
2023-06-21 01:16:20 -04:00
elasticsearchmachine e133ae1309 Merge pull request ESQL-1296 from elastic/main
🤖 ESQL: Merge upstream
2023-06-20 13:20:47 -04:00
Carlos Delgado 75729363e2
Synonyms API - PUT Synonym Rule request (#96865) 2023-06-20 18:45:41 +02:00
Kathleen DeRusso cd2a69c032
Add API calls to Get, Delete Query Rulesets (#96849) 2023-06-20 09:02:28 -04:00
Nhat Nguyen ae24412b53 Merge remote-tracking branch 'upstream-elastic/main' into sync-main 2023-06-19 23:06:11 -07:00
Mayya Sharipova b508ee7886
Auto-reload synonym analyzers on synonyms updates (#96886)
Synonym Management API project

On changes of synonyms in a synonym set, auto-reload analyzers.
Note that currently all updateable analyzers will be reloaded, even
those that are not relevant for a synonyms set being updated.
2023-06-19 10:50:02 -04:00
elasticsearchmachine 60f6c68bcd Merge pull request ESQL-1284 from elastic/main
🤖 ESQL: Merge upstream
2023-06-16 01:14:58 -04:00
Kathleen DeRusso 163fa8c96b
Remove create parameter from put query ruleset API call (#96883) 2023-06-15 14:00:44 -04:00
elasticsearchmachine 56c0e62c85 Merge pull request ESQL-1283 from elastic/main
🤖 ESQL: Merge upstream
2023-06-15 13:13:46 -04:00
Kathleen DeRusso 008a9fc46d
Add Put Query Ruleset API call (#96812) 2023-06-15 10:37:18 -04:00
Craig Taverner 9dbce6f6c7
Asset tracking: geo_line for TSDB (#94954)
* WIP Started geo_line for TSDB work

Starting with YAML tests (which currently pass) and AggregatorTests
(currently failing, likely due to mistake in the tests)

* Update docs/changelog/94954.yaml

* WIP Refactoring to prepare for TSDB geo_line

* Created TimeSeries version of GeoLineAggregator, and wired it in so that time-series aggregations use it, but current behavior is still identical to non-time-series.
* Added both yaml and unit tests for testing that geo_line works with correct results in both time-series and non-time-series cases.
* Added additional tests to verify the grouping behaviour of time-series vs. terms aggs, and the combination of the two.

* WIP Refactoring to prepare for TSDB geo_line

* Started refactoring to re-use simplifier for all buckets

* Fixed bug with leaf collector not changing per segment

* Fixed bug with leaf collector not detecting bucket changes

The bucket id can change within a segment, so we need to detect this and save the geo_line.

* Renamed class since it no longer extends BucketedSort

The original geo_line relied on the BucketedSort for all intelligence.
The time-series geo_line uses none of that, and does its own memory management.

* Fixed bug with geo_point leaking between geo_line buckets

And enhanced unit tests to cover multiple groups

* Code review updates

* Verify that the sort field is specifically the TS timestamp

Only activate the time-series optimizations if the aggregation is both:
* Within a time-series aggregation (ie. tsid and @timestamp ordered)
* The geo_line sort field is @timestamp

* Allow geo_point time-series to skip sort config

Also disables the new geo_line for time-series even if the correct
sort and point fields are used if the point field is not explicitly
configured to be a position metric.

* Support geo_centroid and geo_bounds on position metric

* Update yaml tests for multi-terms tests

* Changed to disallow alternative sort-fields in ts-geo_line

Since the primary criteria for switching to the new algorithm is that
geo_line is within a time-series aggregation, we now disallow any other sort field.

We test the negative case in the yaml tests, but changed the unit tests to
use TermsAggregation to minim the time-series aggregation to get comparable
results.

* For non-time-series check missing sort field early

The old code only threw error if there was data because the check was done
inside the leaf collector just before actually reading the sort field.
And there were no tests for missing sort field.

This commit adds the tests, and checks early so even if data is missing.

* Reviewed TODOs

* Test that behaviour is identical with or without POSITION metric
* Removed fallback code in builder (was switching to old geo_line without POSITION metric)
* Removed two TODO's that are no longer valid concerns
2023-06-15 14:58:25 +02:00
Pooya Salehi 01731aec0c
Stateless real-time mget (#96763)
The mget counterpart of
https://github.com/elastic/elasticsearch/pull/93976.

Relates ES-5677
2023-06-15 05:56:02 -04:00
elasticsearchmachine df3a460935 Merge pull request ESQL-1279 from elastic/main
🤖 ESQL: Merge upstream
2023-06-15 01:16:31 -04:00
Volodymyr Krasnikov 674441ded8
Fix Node stats API metric name (#96815) 2023-06-14 10:03:34 -07:00
Nhat Nguyen 31949fcbde Merge remote-tracking branch 'elastic/esql/lang' into merge-main 2023-06-13 21:20:00 -07:00
Volodymyr Krasnikov 7abe8cb974
Add repo throttle metrics to node stats api response (#96678)
* Add repo throttle metrics to node stats api response

* Update docs/changelog/96678.yaml

* Change x-content output structure

* Fix test after merge from main

* Follow PR comments

* minor fixes

* minor fixes 2

* Introduce new TransportVersion (V_8_500_010)

* Fix yaml test

* Follow PR comments

* Make stats datapoints human readable

* Follow common pattern for human readable output

* Bump up TransportVersion
2023-06-13 09:04:36 -07:00
Carlos Delgado 6538bdcb82
Synonyms API - Synonyms Sets GET (#96587) 2023-06-13 10:07:30 +02:00
elasticsearchmachine 2a0b1acadb Merge pull request ESQL-1265 from elastic/main
🤖 ESQL: Merge upstream
2023-06-12 09:48:51 -04:00
Pablo Alcantar Morales 5a623ee3bf
Add `script` information to the cluster info endpoint (#96613)
Add a new target (`script`) to the `/_info` API. It consolidates all the script information from the cluster nodes and returns a summary at the cluster level (compared with `_nodes/stats/script` it lacks the `<node>` dimension).
2023-06-12 10:10:21 +02:00
elasticsearchmachine 094cad0376 Merge pull request ESQL-1257 from elastic/main
🤖 ESQL: Merge upstream
2023-06-09 13:12:27 -04:00
Martijn van Groningen 65dff5c4c2
Update yaml test skip version after #96461 was back ported (#96486) 2023-06-09 05:23:11 -04:00