Commit graph

3650 commits

Author SHA1 Message Date
Joe Gallo
25ffc1526a
Support IPinfo database configurations (#114548) (#114663) 2024-10-12 09:15:57 +11:00
Pat Whelan
8da430bd6c
[ML] Add Streaming Inference spec (#113812) (#114262)
API for `/_inference/{task_type}/{inference_id}/_stream` and `/_inference/{inference_id}/_stream`

Request is `application/json`
Response is `text/event-stream`
2024-10-08 07:08:52 +11:00
Oleksandr Kolomiiets
bad8abebb6
Fix flattened ignore_above tests (#114155) (#114160)
This fixes tests so that they can work with multiple shards.
2024-10-05 04:30:09 +10:00
Oleksandr Kolomiiets
083a2bfb1e
[8.x] Fix features for synthetic source test (#114070) (#114082)
* Fix features for synthetic source test (#114070)

* Unmute test
2024-10-04 09:38:51 +10:00
Oleksandr Kolomiiets
4da7a0f338
Do not expand dots when storing objects in ignored source (#113910) (#114071)
(cherry picked from commit 7facc94be6)

# Conflicts:
#	rest-api-spec/build.gradle
2024-10-03 15:30:38 -07:00
Kostas Krikellas
faaf4ba7fd
[8.x] Add object param for keeping synthetic source (#113690) (#114058)
* Add object param for keeping synthetic source (#113690)

* Add object param for keeping synthetic source

* Update docs/changelog/113690.yaml

* fix merging

* add tests

* merge

* fix randomized tests

* add documentation

* dedup id in docs

* update documentation

* update documentation

* fix bwc

* fix bwc

* fix unintended

* Revert "fix bwc"

This reverts commit 18dc913eee.

* Revert "fix bwc"

This reverts commit f4ddb0e5e5.

* add missing test

* fix transform

* fix transform

* fix transform

* fix transform

* fix transform

(cherry picked from commit dd2024881d)

# Conflicts:
#	rest-api-spec/build.gradle

* Update build.gradle

* Update MapperFeatures.java

* Update 20_synthetic_source.yml

* Update 21_synthetic_source_stored.yml

* Update 21_synthetic_source_stored.yml

* Update 21_synthetic_source_stored.yml

* Update 21_synthetic_source_stored.yml
2024-10-04 08:08:44 +10:00
David Turner
b21b147bd0
Fix up test after backport of #113852 (#113883) (#113921)
This test skip is not needed any more.
2024-10-04 00:53:06 +10:00
Benjamin Trent
f057ff72c4
Add more dense_vector details for cluster stats field stats (#113607) (#113884)
This adds some more counts for dense_vector field mapping stats. This
allows for seeing the number of mappings with a given element type,
similarity, or index type.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-03 23:16:22 +10:00
Andrei Dan
4d7cd1335c
Skip compat test in 8.x (#113996)
Relates to https://github.com/elastic/elasticsearch/pull/112258
2024-10-03 19:19:13 +10:00
Kostas Krikellas
e5bebfe400
Remove special handling for objects and arrays with dynamic overrides (#113924) (#113959)
* Remove special handling for objects and arrays with `dynamic` overrides

* add test

* add test

(cherry picked from commit c840ea3812)
2024-10-02 19:28:01 +03:00
David Turner
b2d05e37e2
Reinstate support for GET _cluster/stats?timeout=... (#113852) (#113878)
Relates #112478
2024-10-02 02:38:45 +10:00
john-wagster
8a8ad1b815
updated rangetype to be more inline with the docs (https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-range-query.html) and added tests to reflect as much (#113872) 2024-10-02 01:40:55 +10:00
Chris Hegarty
45a08b94b3
Upgrade to Lucene 9.12.0 (#113333) (#113835)
This commit upgrades to Lucene 9.12.0.

Co-authored-by: Adrien Grand <jpountz@gmail.com>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: Benjamin Trent <ben.w.trent@gmail.com>
Co-authored-by: John Wagster <john.wagster@elastic.co>
Co-authored-by: Luca Cavanna <javanna@apache.org>
Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
2024-10-01 13:55:02 +01:00
Stanislav Malyshev
029cd94677
Implement remote cluster CCS telemetry (#112478) (#113814)
* Add remote cluster stats to _cluster/stats
* Implement remote cluster stats polling
* Add docs for the include_remotes part

(cherry picked from commit b26d81c713)
2024-10-01 04:52:59 +10:00
Kostas Krikellas
7b3d726eca
Revert "Apply auto-flattening to subobjects: auto (#112092)" (#113692) (#113760)
* Revert "Apply auto-flattening to `subobjects: auto` (#112092)"

This reverts commit fffe8844

* fix DataGenerationHelper

(cherry picked from commit c9f378da29)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java
2024-09-30 18:19:26 +10:00
Oleksandr Kolomiiets
982b062297
[8.x] Fix ignore_above handling in synthetic source when index level setting is used (#113570) (#113640)
* Fix ignore_above handling in synthetic source when index level setting is used (#113570)

* Update build.gradle
2024-09-26 14:37:39 -07:00
Mayya Sharipova
7719f17457
Deprecate legacy params from range query (#113286) (#113610)
Deprecate to, from, include_lower, include_upper range query params.
These params have been removed from our documentation in v. 0.90.4 (d6ecdecc19),
but did not got through deprecation cycle.

These params to be removed in v9.0.

Related to #81276

Closes #48538
2024-09-27 01:10:46 +10:00
Kostas Krikellas
8539876663
[8.x] Apply auto-flattening to subobjects: auto (#113584)
* Apply auto-flattening to `subobjects: auto` (#112092)

* Introduce mode `subobjects=auto` for objects

* Update docs/changelog/110524.yaml

* compilation error

* tests and fixes

* refactor

* spotless

* more tests

* fix nested objects

* fix test

* update fetch test

* add QA coverage

* update tests

* update tests

* update tests

* Apply auto-flattening to `subobjects: auto`

* Update docs/changelog/112092.yaml

* sync

* dont flatten subobjects auto

* refine test

* fix path for nested flattened objects and dynamic

* document `subobjects: auto`

* Apply suggestions from code review

Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>

* comment updates

* restore indentation in comment

* update comment

* update comment

* update comment

* update comment

* rename isFlattenable

* add test for dynamic template

* fix copy_to and noop dynamic updates

* tests

* update comment

* fix tests

* update cluster feature in yaml test

* address comments

---------

Co-authored-by: Felix Barnsteiner <felixbarny@users.noreply.github.com>
(cherry picked from commit fffe8844e9)

# Conflicts:
#	modules/dot-prefix-validation/build.gradle
#	rest-api-spec/build.gradle

* Update build.gradle
2024-09-26 20:17:11 +10:00
Oleksandr Kolomiiets
57915388f5
Fix synthetic source for flattened field when used with ignore_above (#113499) (#113568)
(cherry picked from commit 35fbbec46a)

# Conflicts:
#	rest-api-spec/build.gradle
2024-09-25 16:59:33 -07:00
Simon Cooper
40f1e5057e
Add blog links to locale deprecation warnings (#113474) 2024-09-25 14:24:05 +01:00
Andrei Dan
d553b8bef9
Implement parseBytesRef for TimeSeriesRoutingHashFieldType (#113373) (#113439)
This implements the `parseBytesRef` method for the `_ts_routing_hash` field so we
can parse the values generated by the companion `format` method.
We parse the values when fetching them from the source when the field is used
as a `sort` paired with `search_after`.

Before this change a sort by and search_after `_ts_routing_hash` would yield
an `UnsupportedOperationException`

(cherry picked from commit 4e5e870370)
Signed-off-by: Andrei Dan <andrei.dan@elastic.co>
2024-09-24 20:08:31 +10:00
Salvatore Campagna
bac208a154
Introduce an ignore_above index-level setting (#113121) (#113414)
Here we introduce a new index-level setting, `ignore_above`, similar to what we have
for `ignore_malformed`. The setting will apply to all `keyword`, `wildcard` and `flattened`
fields. Each field mapping will still be allowed to override the index-level setting using a
mapping-level `ignore_above` value.

(cherry picked from commit 208a1fe571)
2024-09-24 06:16:08 +10:00
Oleksandr Kolomiiets
d17aab75a7
Fix new synthetic source copy_to tests to pass on serverless (#113320) (#113388)
(cherry picked from commit 6b11af38d6)
2024-09-23 08:45:35 -07:00
Oleksandr Kolomiiets
f95f292881
[8.x] Correctly identify parent of copy_to destination field for synthetic source purposes (#113153) (#113307)
* Correctly identify parent of copy_to destination field for synthetic source purposes (#113153)

(cherry picked from commit b9855b8e4e)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java

* Comma
2024-09-23 07:25:47 -07:00
Felix Barnsteiner
0aebbb53d6
[8.x] Add support for multi-value dimensions (#112645) (#113369)
* Add support for multi-value dimensions (#112645)

Closes https://github.com/elastic/elasticsearch/issues/110387

Having this in now affords us not having to introduce version checks in
the ES exporter later. We can simply use the same serialization logic
for metric attributes as we do for other signals. This also enables us
to properly map `*.ip` fields to the ip field type as ip fields
containing a list of IPs are not converted to a comma-separated list.

(cherry picked from commit 8d223cbf7a)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/TimeSeriesIdFieldMapper.java

* Remove skip test for 8.x

This was just needed for 8.x to 9.0 compatibility tests
2024-09-24 00:05:25 +10:00
Oleksandr Kolomiiets
9a6fcd6d62
[8.x] Fix ignore_above for flattened fields (#112944) (#113308)
* Fix `ignore_above` for flattened fields (#112944)

Flattened fields do no actually use `ignore_above`. When retrieving source, `ignore_above` behaves
as expected. Anyway, it is ignored when fetching field values through the fields API. In that case
values are returned no matter the `ignore_above` setting. Here we implement the filtering logic
in the `ValueFecther` implementation of `RootFlattenedFieldType`.

(cherry picked from commit 91674f85a0)

* Fix

---------

Co-authored-by: Salvatore Campagna <93581129+salvatore-campagna@users.noreply.github.com>
2024-09-21 06:42:16 +10:00
Simon Cooper
ceb9deff89
Use deprecation logger for CLDR date format specifiers (#112917)
The addition of the logger requires several updates to tests to deal with the possible warning, or muting if there is not way to specify an allowed (but not mandatory) warning
2024-09-19 15:50:37 +01:00
Kostas Krikellas
bcc4027af1
Configure keeping source in FieldMapper (#112706) (#113181)
Introduces per-field param `synthetic_source_keep` that overrides the
behavior for keeping the field source in synthetic source mode:  -
`none` : no source is stored  - `arrays`: the incoming source is
recorded as-is for arrays of a given field  - `all`: the incoming source
is recorded as is for both singleton and array values of a given field

Related to #112012
2024-09-20 00:39:11 +10:00
Kostas Krikellas
fec667fb6c
[8.x] Retrieve the source for objects and arrays within arrays in a separate parsing phase (#113169)
* Retrieve the source for objects and arrays within arrays in a separate parsing phase (#113027)

In synthetic source, storing array elements to `_ignored_source` may
hide other, regular elements from showing up during source synthesizing.
This is due to contents from `_ignored_source` taking precedence over
matching fields from regular source loading.

To avoid this, arrays are pre-emptively tracked and marked for source
storing, if any of their elements needs to store its source. A second
doc parsing phase is introduced that checks for fields missing values
and records their source, while skipping objects and arrays that don't
contain any such fields.

Fixes #112374

(cherry picked from commit 4ff4384550)

# Conflicts:
#	muted-tests.yml

* merge

* fix compilation error, jdk-21 function
2024-09-19 14:46:19 +03:00
Lee Hinman
9f0ae87c53
[8.x] Deprecate dot-prefixed indices and composable template index patterns (#112571) (#113146)
* Deprecate dot-prefixed indices and composable template index patterns (#112571)

This commit adds a module emitting a deprecation warning when a
dot-prefixed index is manually or automatically created, or when a
composable index template with an index pattern that uses a dot-prefix
is created. This pattern warns that in the future these indices will not
be allowed. In a future breaking change (10.0.0 maybe?) the deprecation
can then be changed to an exception.

These deprecations are only displayed when a non-operator user is using
the API (one that does not set the `X-elastic-product-origin` header).

* Attempt to fix build for V7 gradle stuff

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-09-19 07:31:55 +10:00
Quentin Pradet
4ebe13b37c
[DOCS] Fix GeoIP database rest-api-spec doc URLs (#113082) (#113091) 2024-09-18 20:22:45 +10:00
Mark Vieira
0279c0a909
Add AGPLv3 as a supported license 2024-09-13 14:30:33 -07:00
Oleksandr Kolomiiets
12b4900107
Ensure that fields copied using copy_to are not present in synthetic source (#112625) (#112835) 2024-09-13 06:21:03 +10:00
Matteo Piergiovanni
9d4602d148
[8.x] Two empty mappings now are created equally (#107936) (#112794) 2024-09-12 13:14:24 +02:00
David Turner
f79fb8c25b
Introduce repository integrity verification API (#112348)
Adds an API which scans all the metadata (and optionally the raw data)
in a snapshot repository to look for corruptions or other
inconsistencies.

Closes https://github.com/elastic/elasticsearch/issues/52622 Closes
ES-8560
2024-09-11 23:17:59 +10:00
Nhat Nguyen
f19e488b6d
Fix NPE in dense_vector stats (#112720)
If a segment doesn't contain any documents with a dense_vector field, 
but the mapping defines it, an NPE can occur when retrieving the
dense_vector stats.

Relates #111729
2024-09-10 15:28:41 -07:00
Oleksandr Kolomiiets
082e7211b3
Use fallback synthetic source for copy_to and doc_values: false cases (#112294) 2024-09-10 12:12:51 -07:00
Niels Bauman
64694e30ca
Add allowed warning for index template creation (#112600)
Follow-up of #111161

Fixes #112597
2024-09-07 19:08:34 +10:00
Quentin Pradet
602e60bda8
Fix missing header in put_geoip_database JSON spec (#112581) 2024-09-07 12:15:34 +04:00
mohamedhamed-ahmed
e2a1605e4b
Update resolve index missing type definition (#112509) 2024-09-05 18:38:29 +03:00
Keith Massey
4aa3c3d7ee
Add support for templates when validating mappings in the simulate ingest API (#111161) 2024-09-05 09:25:53 -05:00
Kostas Krikellas
d5bae2cdee
Control storing array source with index setting (#112397)
Introduce an index setting that forces storing the source of leaf field
and object arrays in synthetic source mode. Nested objects are excluded
as they already preserve ordering in synthetic source.

Next step is to introduce override params at the mapper level that will
allow disabling the source, or storing the source for arrays (if not
enabled at index level), or storing the source for both arrays and
singletons. This will happen in follow-up changes, so that we can
benchmark the impact of this change in parallel.

Related to #112012
2024-09-05 01:12:19 +10:00
Simon Cooper
a36d90cf34
Use CLDR locale provider on JDK 23+ (#110222)
JDK 23 removes the COMPAT locale provider, leaving CLDR as the only option. This commit configures Elasticsearch
to use the CLDR provider when on JDK 23, but still use the existing COMPAT provider when on JDK 22 and below.

This causes some differences in locale behaviour; this also adapts various tests to still work whether run on COMPAT or CLDR.
2024-09-04 13:42:40 +01:00
Luke Whiting
0426e1fbd5
(API) Cluster Health report unassigned_primary_shards (#111727) (#112024)
This PR adds a count of currently unassigned primary shards to both the
`/_cat/health` and `/_cluster/health` endpoints. This is to aid cluster
administrators in estimating the time remaining for a cluster to go from
RED to YELLOW status as per enchancement request #111727.

Tests and doc updates are in place with this PR and manual testing with
`./gradlew run` has been conducted on the endpoints to ensure correct
output.

## Known Limitations * Testing   * Due to limitations in the YAML REST
test framework skip functionality, YAML REST tests for this endpoint are
disabled when running a mixed version cluster by using a cluster version
number synthetic feature to skip when any member of the cluster is not
at a version greater than when this change is due to be introduced
2024-09-02 20:00:06 +10:00
Lee Hinman
4ae88f98dc
Add 'verbose' flag retrieving maximum_timestamp for get data stream API (#112303)
This commit adds support for the `verbose` querystring parameter to the
get data stream API (`GET /_data_stream/{name}`).

The flag defaults to "false".

When set to true, the `maximum_timestamp` for the data stream will be
retrieved and returned for each data stream retrieved. This is the same
information available from the data stream stats API (and internally
uses the same action to retrieval).
2024-08-31 03:18:15 +10:00
Salvatore Campagna
68b211e025
Store original source for keywords using a normalizer (#112151)
Using a normalizer for a keyword field might result in not being able
to reconstruct the original source when using synthetic source.
Here if synthetic source is enabled and a normalizer is configured
we store the original value in a stored field which is later used
at document reconstruction time to reconstruct the field value as
it was in the original document.

We use the same fallback solution we use in other places like
`ignore_malformed`.
2024-08-29 16:01:56 +02:00
Lee Hinman
80f602f44b
Fix typo in rest-api-spec capabilities documentation (#112304) 2024-08-29 08:42:21 +10:00
Oleksandr Kolomiiets
0fe220a075
Hide new test behind a feature (#112301) 2024-08-28 12:59:46 -07:00
Oleksandr Kolomiiets
38adbb0724
Prevent synthetic field loaders accessing stored fields from using stale data (#112173) 2024-08-27 14:55:00 -07:00
Kostas Krikellas
3c92797d0d
Allow warnings for template conflicts (#112145)
Fixes #112143
2024-08-24 00:53:07 +10:00