Commit graph

3620 commits

Author SHA1 Message Date
Rene Groeschke
c158859921
[8.16] Reapply "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300) (#119325) (#119338)
* Reapply "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300) (#119325)

* Reapply "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300)

The original PR (#118894) has broken serverless.

* Fix gitinfo plugin for serverless usage

* Update buildscan git revision reference

(cherry picked from commit 5278159987)

# Conflicts:
#	build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/PublishPlugin.java

* Fix merge conflict
2024-12-30 15:31:36 +01:00
Quentin Pradet
d4c328f155
Add missing timeouts to rest-api-spec SLM APIs (#118958) (#119267) 2024-12-25 10:55:20 +11:00
Quentin Pradet
3ccb723176
Add missing timeouts to rest-api-spec ingest APIs (#118844) (#118913) 2024-12-18 16:06:03 +11:00
Quentin Pradet
d2caa5ba6f
Add missing timeouts to rest-api-spec ILM APIs (#118837) (#118911) 2024-12-18 16:03:32 +11:00
Carlos Delgado
77d5002d9a
[8.16] Fix BwC synonyms tests (#118691) (#118819)
* Fix BwC  synonyms tests (#118691)

(cherry picked from commit d09d57db80)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms/90_synonyms_reloading_for_synset.yml

* Fix merge

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-18 01:48:09 +11:00
Panagiotis Bailis
79c63367bb
Adding missing json spec for allow_partial_search_results in point-in-time (#117121) (#117241) 2024-11-22 01:21:22 +11:00
Quentin Pradet
e37beff717
[8.16] Add missing header in put_data_lifecycle rest-api-spec (#116657) 2024-11-14 05:10:49 +11:00
Kostas Krikellas
e80a641f36
[8.16] Track source for objects and fields with [synthetic_source_keep:arrays] in arrays as ignored (#116065) (#116226)
* Track source for objects and fields with [synthetic_source_keep:arrays] in arrays as ignored (#116065)

* Track source for objects and fields with [synthetic_source_keep:arrays] in arrays as ignored

* Update TransportResumeFollowActionTests.java

* rest compat fixes

* rest compat fixes

* update test

(cherry picked from commit 6cf45366d5)

# Conflicts:
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/21_synthetic_source_stored.yml
#	server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java
#	server/src/main/java/org/elasticsearch/index/mapper/DocumentParserContext.java
#	server/src/test/java/org/elasticsearch/index/mapper/IgnoredSourceFieldMapperTests.java

* Update DocumentParserContext.java

* fixes
2024-11-05 11:55:04 +02:00
Kostas Krikellas
776af45e00
[8.16][TEST] Add missing required feature to yaml tests (#116010)
* Update muted-tests.yml

* Update 20_synthetic_source.yml
2024-10-31 15:38:39 +02:00
Kostas Krikellas
406f65fb31
[8.16] Use flattened names in ignored source (#115822) (#115899)
* Use flattened names in ignored source (#115822)

* Use flattened names in ignored source

* spotless

* fix rest compat

* fix unittests

* expand dots

(cherry picked from commit 06eb0727c2)

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

* Update 20_synthetic_source.yml

* Update 21_synthetic_source_stored.yml
2024-10-30 09:26:56 +02:00
John Wagster
239038bba7
removing vestigial 'Date range' test (#115677) 2024-10-26 04:24:22 +11:00
Benjamin Trent
ffc4575d83
Adjust index creation for dense vector telemetry tests (#114857)
In 8.x we need to have bwc back to when before `element_type: byte`
existed. To prevent loss of coverage for past versions & telemetry, here
I move the index creation around so that we only create with `byte` when
we have the more recent telemetry changes (and thus also `byte`
elements).

closes: https://github.com/elastic/elasticsearch/issues/114556
2024-10-17 00:52:58 +11:00
Oleksandr Kolomiiets
17022fdefc
[8.x] Allow stored source in logsdb and tsdb (#114454) (#114648)
* Allow stored source in logsdb and tsdb (#114454)

(cherry picked from commit a62228a744)

# Conflicts:
#	modules/aggregations/build.gradle
#	modules/data-streams/src/javaRestTest/java/org/elasticsearch/datastreams/logsdb/LogsIndexModeCustomSettingsIT.java
#	rest-api-spec/build.gradle

* Fix tests

* Fix tests

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-15 12:07:27 -07:00
Niels Bauman
b96d3cbbf9
Mark Data Stream Lifecycle APIs to stable (#114780) (#114843)
Data Stream Lifecycle has GA'ed in 8.14, so we can safely mark these as
stable.
2024-10-16 03:19:28 +11:00
Benjamin Trent
64e8f2ac9c
[8.x] Adding new bbq index types behind a feature flag (#114439) (#114783)
* Adding new bbq index types behind a feature flag (#114439)

new index types of bbq_hnsw and bbq_flat which utilize the better binary quantization formats. A 32x reduction in memory, with nice recall properties.

(cherry picked from commit 6c752abc23)

* spotless
2024-10-15 07:04:19 -04:00
Kostas Krikellas
db9a125f39
[8.x] Guard second doc parsing pass with index setting (#114649) (#114799)
* Guard second doc parsing pass with index setting (#114649)

* Guard second doc parsing pass with index setting

* add test

* updates

* updates

* merge

(cherry picked from commit 98e0a4e953)

* Update 21_synthetic_source_stored.yml
2024-10-15 20:47:40 +11:00
Benjamin Trent
a5e0226836
Fix Synthetic Source Handling for bit Type in dense_vector Field (#114407) (#114756)
**Description:**

This PR addresses the issue described in [#114402](https://github.com/elastic/elasticsearch/issues/114402), where the `synthetic_source` feature does not correctly handle the `bit` type in `dense_vector` fields when `index` is set to `false`. The root cause of the issue was that the `bit` type was not properly accounted for, leading to an array that is 8 times the size of the actual `dims` value of docvalue. This mismatch will causes an array out-of-bounds exception when reconstructing the document.

**Changes:**

- Adjusted the `synthetic_source` logic to correctly handle the `bit` type by ensuring the array size accounts for the 8x difference in dimensions.
- Added yaml test to cover the `bit` type scenario in `dense_vector` fields with `index` set to `false`.

**Related Issues:**

- Closes [#114402](https://github.com/elastic/elasticsearch/issues/114402)
- Introduced in [#110059](https://github.com/elastic/elasticsearch/pull/110059)

Co-authored-by: Rassyan <yjkhngds@gmail.com>
2024-10-15 07:10:06 +11:00
Benjamin Trent
6a00e91b1c
Fixing test failure for #114556 (#114617) (#114632)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-15 07:06:06 +11:00
Kathleen DeRusso
df62bcfce1
Add a query rules tester API call (#114168) (#114747)
* Add a query rules tester API call

* Update docs/changelog/114168.yaml

* Wrap client call in async with origin

* Remove unused param

* PR feedback

* Remove redundant test

* CI workaround - add ent-search as ml dependency so it can find node features
2024-10-15 05:04:25 +11:00
Martijn van Groningen
9348d9fcb8
Add feature flag for subobjects auto (#114616) (#114678) 2024-10-13 05:08:41 +11:00
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