Commit graph

3650 commits

Author SHA1 Message Date
Quentin Pradet
11f03c5479
Add missing cause param to indices.put_template API (#125189) (#125203) 2025-03-19 23:06:06 +11:00
Jonathan Buttner
4dfc977343
[ML] Set inference API stability to stable (#116828) (#124220)
(cherry picked from commit 590b75df21)

Co-authored-by: David Kyle <david.kyle@elastic.co>
2025-03-07 02:00:22 +11:00
Rene Groeschke
f4e505e635
Update Gradle wrapper to 8.13 (#122421) (#123875)
* Fix Gradle Deprecation warning as declaring an is- property with a Boolean type has been deprecated.
* Make use of new layout.settingsFolder api to address some cross project references
* Fix buildParams snapshot check for multiprojet projects

(cherry picked from commit e19b2264af)

# Conflicts:
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java
#	docs/build.gradle
#	qa/entitlements/build.gradle
#	x-pack/qa/multi-project/core-rest-tests-with-multiple-projects/build.gradle
#	x-pack/qa/multi-project/xpack-rest-tests-with-multiple-projects/build.gradle
2025-03-05 15:57:55 +01:00
Quentin Pradet
26de857b02
Add missing ES|QL, data stream, inference, and PKI security specifications (#119472) (#123137)
(cherry picked from commit 1329a9aa9a)

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2025-02-22 00:51:41 +11:00
Benjamin Trent
da33a03a84
Addressing int4 flat flakiness (#121437) (#122539)
This simplifies the setup and relaxes the similarity check.

We can restrict the similarity check once we evolve the quantization
algorithm in the future.

(cherry picked from commit 2de1a3defe)
2025-02-14 09:14:26 +11:00
Benjamin Trent
1a426889ab
Fix synthetic source bug that would mishandle nested dense_vector fields (#122425) (#122437)
When utilizing synthetic source with nested fields, we attempt to
rebuild the child values in addition to all the parent values.

While this generally works well, its potential that certain values might
be missing from various child docs. Consequently, we will attempt to
iterate the vector values strangely, resulting in seemingly missing
values or potentially exceptions indicating EOFs.

closes: #122383
(cherry picked from commit f5c901e68c)
2025-02-13 09:44:18 +11:00
Quentin Pradet
6b9ac5ec82
Add back keep_alive to async_search.submit rest-api-spec (#120781) (#120787) 2025-01-25 00:39:42 +11:00
Quentin Pradet
7881ea2d5c
Add missing timeouts to rest-api-spec shutdown APIs (#118921) (#119737) 2025-01-08 21:56:46 +11:00
Quentin Pradet
6e43ae40d0
Add missing parameter to xpack.info rest-api-spec (#118954) (#119739)
* Add missing parameter to xpack.info rest-api-spec

* Update docs/changelog/118954.yaml
2025-01-08 21:50:05 +11:00
Quentin Pradet
bb48f0a60d
Remove unsupported timeout from rest-api-spec license API (#118919) (#119733) 2025-01-08 21:29:13 +11:00
Rene Groeschke
5622855a4a
Reapply "[Build] Do not invalidate configuration cache when branch is switched (#118894)" (#119300) (#119325) (#119337)
* 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
2024-12-30 20:02:06 +11:00
Quentin Pradet
579a57dec4
Add missing timeouts to rest-api-spec SLM APIs (#118958) (#119266) 2024-12-25 10:47:19 +11:00
Carlos Delgado
bcaa255caa
Fix BwC synonyms tests (#118691) (#118818)
(cherry picked from commit d09d57db80)

# Conflicts:
#	muted-tests.yml
#	rest-api-spec/build.gradle
2024-12-18 19:19:21 +11:00
Quentin Pradet
414e291d9b
Add missing timeouts to rest-api-spec ILM APIs (#118837) (#118910) 2024-12-18 16:29:33 +11:00
Quentin Pradet
d6f3d7a15b
Add missing timeouts to rest-api-spec ingest APIs (#118844) (#118912) 2024-12-18 16:26:28 +11:00
Kostas Krikellas
417f3bb768
Parse the contents of dynamic objects for [subobjects:false] (#117762) (#117921)
* Parse the contents of dynamic objects for [subobjects:false]

* Update docs/changelog/117762.yaml

* add tests

* tests

* test dynamic field

* test dynamic field

* fix tests

(cherry picked from commit f2addbc69a)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/MapperFeatures.java
2024-12-04 06:27:21 +11:00
Quentin Pradet
1daa2731a3
Remove unsupported async_search parameters from rest-api-spec (#117626) (#117764) 2024-11-30 01:32:08 +11:00
Martijn van Groningen
7ed32c29a6
[8.17] Add source mode stats to MappingStats (#117697)
* Add source mode stats to MappingStats (#117463)

* update bwc logic for 8.17
2024-11-28 22:37:46 +11:00
Carlos Delgado
a9f4bf8b00
Fix and unmute synonyms tests using timeout (#117486) (#117517) 2024-11-26 07:41:13 +01:00
Nhat Nguyen
952df62bc2
Deprecate source mode in mappings (#117177) (#117527)
Backport of #116689 to 8.17

This change deprecates _source.mode in mappings, replacing it with
the index.mapping.source.mode index setting.
2024-11-25 20:26:52 -08:00
Quentin Pradet
9f2b8c6119
Add missing async_search query parameters to rest-api-spec (#117312) (#117477)
(cherry picked from commit 2f8bb0b23c)
2024-11-26 01:33:10 +11:00
Panagiotis Bailis
47c944977d
Adding missing json spec for allow_partial_search_results in point-in-time (#117242) 2024-11-21 16:58:35 +02:00
Martijn van Groningen
1bc60acdef
Revert "Deprecate _source.mode in mappings (#117106)" (#117151)
This reverts #117106. Bwc tests fail, because older nodes are killed with the following error:

```
[2024-11-20T10:54:58,600][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [v8.17.0-0] fatal error in thread [elasticsearch[v8.17.0-0
][clusterApplierService#updateTask][T#1]], exiting java.lang.AssertionError: provided source [{"_doc":{"_data_stream_timestamp":{"enabled":true},"_source":{},"properties":{"@timestamp":{"type":"date"},"k8s":{"properties":{"pod":{"properties":{"ip":{"type":"ip"},"name":{"type":"keyword"},"network":{"properties":{"rx":{"type":"long"},"tx":{"type":"long"}}},"uid":{"type":"keyword","time_series_dimension":true}}}}},"metricset":{"type":"keyword","time_series_dimension":true}}}}] differs from mapping [{"_doc":{"_data_stream_timestamp":{"enabled":true},"_source":{"mode":"synthetic"},"properties":{"@timestamp":{"type":"date"},"k8s":{"properties":{"pod":{"properties":{"ip":{"type":"ip"},"name":{"type":"keyword"},"network":{"properties":{"rx":{"type":"long"},"tx":{"type":"long"}}},"uid":{"type":"keyword","time_series_dimension":true}}}}},"metricset":{"type":"keyword","time_series_dimension":true}}}}]
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.DocumentMapper.<init>(DocumentMapper.java:66)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.MapperService.newDocumentMapper(MapperService.java:588)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.mapper.MapperService.updateMapping(MapperService.java:346)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.index.IndexService.updateMapping(IndexService.java:840)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.createIndicesAndUpdateShards(IndicesClusterStateService.java:583)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.doApplyClusterState(IndicesClusterStateService.java:306)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.indices.cluster.IndicesClusterStateService.applyClusterState(IndicesClusterStateService.java:260)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:544)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateAppliers(ClusterApplierService.java:530)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:503)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:432)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:157)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:956)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:218)
        at org.elasticsearch.server@9.0.0-SNAPSHOT/org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:184)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
        at java.base/java.lang.Thread.run(Thread.java:1575)
```

The `mode` parameter no longer gets serialized for new indices. However on the older nodes still serialize the `mode` parameter, which caused the menioned assertion to fail. Reverting for now and see how best to address this bwc serialization issue.

We can only stop serializing mode, when all nodes are on the same version.  Unfortunately we can't invoke `c.clusterTransportVersion().get()` from parser or builder, because that calling thread isn't allowed to call `clusterService.state()`.
2024-11-20 13:39:07 +01:00
Nhat Nguyen
e63367eaec
Deprecate _source.mode in mappings (#116689) (#117106)
This change deprecates _source.mode in mappings, replacing it with the
index.mapping.source.mode index setting.
2024-11-20 17:51:22 +11:00
Kostas Krikellas
f2178e24f4
Rename tsdb integration test (#116909) (#116913)
The current name doesn't allow skipping it to workaround compatibility
test failures:

```
> Task :rest-api-spec:yamlRestCompatTestTransform FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rest-api-spec:yamlRestCompatTestTransform'.
> class com.fasterxml.jackson.databind.node.ObjectNode cannot be cast to class com.fasterxml.jackson.databind.node.ArrayNode (com.fasterxml.jackson.databind.node.ObjectNode and com.fasterxml.jackson.databind.node.ArrayNode are in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @15eaac09)
```
2024-11-18 20:46:22 +11:00
Carlos Delgado
1c299fd7e9
Synonyms test fix - update number of shards (#116224) (#116609)
(cherry picked from commit e59407251b)
2024-11-11 18:58:47 +01:00
Benjamin Trent
f14c8bd306
Add new multi_dense_vector field for brute-force search (#116275) (#116526)
This adds a new `multi_dense_vector` field that focuses on the maxSim
usecase provided by Col[BERT|Pali].

Indexing vectors in HNSW as it stands makes no sense. Performance wise
or for cost. However, we should totally support rescoring and
brute-force search over vectors with maxSim.

This is step one of many. Behind a feature flag, this adds support for
indexing any number of vectors of the same dimension.

Supports bit/byte/float.

Scripting support will be a follow up.

Marking as non-issue as its behind a flag and unusable currently.

(cherry picked from commit 7369c0818d)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-12 01:02:39 +11:00
Benjamin Trent
308ad0c05f
[8.x] Add docvalue_fields Support for dense_vector Fields (#114484) (#116491)
* Add `docvalue_fields` Support for `dense_vector` Fields (#114484)

Currently dense_vector field don't support docvalue_fields.

This add this support for debugging purposes. Users can inspect
row values of their vectors even if the source is disabled.

Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
(cherry picked from commit c8a8d4d931)

* fixing for backport

---------

Co-authored-by: Rassyan <yjkhngds@gmail.com>
2024-11-09 08:15:13 +11:00
Quentin Pradet
e76f73ba5f
Add missing header in put_data_lifecycle rest-api-spec (#116292) (#116370) 2024-11-07 14:50:00 +11:00
Kostas Krikellas
01d92b5f31
Track source for objects and fields with [synthetic_source_keep:arrays] in arrays as ignored (#116065) (#116225)
* 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
2024-11-05 19:58:25 +11:00
Kostas Krikellas
2439869034
[8.x] [TEST] Replace _source.mode with index.mapping.source.mode in integration tests - take 2 (#116072) (#116161)
* [TEST] Replace _source.mode with index.mapping.source.mode in integration tests - take 2 (#116072)

* Reapply "[TEST] Replace _source.mode with index.mapping.source.mode in integra…" (#116069)

This reverts commit e8bf344a28.

* [TEST] Replace _source.mode with index.mapping.source.mode in integration tests

* add reason

* add reason

* spotless

* revert unneeded

(cherry picked from commit 4573ab8ec1)

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

* Update MapperFeatures.java
2024-11-04 19:45:47 +11:00
Oleksandr Kolomiiets
06d003bee3
ignore_above default to 8191 for logsdb (#113442) (#116122)
(cherry picked from commit 521e4341d7)
2024-11-02 10:03:16 -07:00
Salvatore Campagna
0ad1a4a631
Default LogsDB value for ignore_dynamic_beyond_limit (#115921)
When ingesting logs, it's important to ensure that documents are not dropped due to mapping issues, also when dealing with dynamically mapped fields. Elasticsearch provides two key settings that help manage the total number of field mappings and handle situations where this limit might be exceeded:

1. **`index.mapping.total_fields.limit`**: This setting defines the maximum number of fields allowed in an index. If this limit is reached, any further mapped fields would cause indexing to fail.

2. **`index.mapping.total_fields.ignore_dynamic_beyond_limit`**: This setting determines whether Elasticsearch should ignore any dynamically mapped fields that exceed the limit defined by `index.mapping.total_fields.limit`. If set to `false`, indexing will fail once the limit is surpassed. However, if set to `true`, Elasticsearch will continue indexing the document but will silently ignore any additional dynamically mapped fields beyond the limit.

To prevent indexing failures due to dynamic mapping issues, especially in logs where the schema might change frequently, we change the default value of **`index.mapping.total_fields.ignore_dynamic_beyond_limit` from `false` to `true` in LogsDB**. This change ensures that even when the number of dynamically mapped fields exceeds the set limit, documents will still be indexed, and additional fields will simply be ignored rather than causing an indexing failure.

This adjustment is important for LogsDB, where dynamically mapped fields may be common, and we want to make sure to avoid documents from being dropped.
2024-10-31 15:54:54 +01:00
Kostas Krikellas
1151ef42f4
Add missing required feature to yaml tests. (#116009)
Fixes #115910, #115911, #115912
2024-10-31 15:38:26 +02:00
Stanislav Malyshev
99196cb212
Fix CCS stats test (#115801) (#115965)
Set index stats to be refreshed immediately - cached 0 size may be the
reason why it fails.

Fixes #115600

(cherry picked from commit 5f4e681788)

# Conflicts:
#	muted-tests.yml
2024-10-31 05:01:15 +11:00
Kostas Krikellas
2aa7a0f5b6
[8.x] Use flattened names in ignored source (#115822) (#115898)
* 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 19:30:05 +11:00
John Wagster
f2914e9a34
[CI] MixedClusterClientYamlTestSuiteIT test {p0=range/20_synthetic_source/Date range} failing - Removed Old Date range test because it's not longer validating useful code - 8x (#115671)
* removing vestigial 'Date range' test

* removing vestigial 'Date range' test

* removing vestigial 'Date range' test
2024-10-26 03:01:19 +11:00
Nhat Nguyen
6c884e7477
[8.x] Add lookup index mode (#115143) (#115596)
* Add lookup index mode (#115143)

This change introduces a new index mode, lookup, for indices intended 
for lookup operations in ES|QL. Lookup indices must have a single shard
and be replicated to all data nodes by default. Aside from these
requirements, they function as standard indices. Documentation will be
added later when the lookup operator in ES|QL is implemented.

* default shard

* minimal

* compile
2024-10-25 12:43:42 +11:00
Oleksandr Kolomiiets
86bcb99246
[8.x] Apply workaround for synthetic source of object arrays inside nested objects (#115275) (#115467)
* Apply workaround for synthetic source of object arrays inside nested objects (#115275)

(cherry picked from commit f04bf5c356)

# Conflicts:
#	rest-api-spec/build.gradle
#	rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/indices.create/21_synthetic_source_stored.yml

* Fix merge
2024-10-23 17:23:48 -07:00
Stanislav Malyshev
8678c6d6da
Fix test - times can be 0 sometimes (#115260) (#115268)
(cherry picked from commit ffcd62e32b)
2024-10-22 06:21:22 +11:00
Oleksandr Kolomiiets
682ed39b21
Remove IndexMode#isSyntheticSourceEnabled (#114963) (#115144)
(cherry picked from commit 16bde51891)

# Conflicts:
#	server/src/main/java/org/elasticsearch/index/mapper/SourceFieldMapper.java
2024-10-18 15:44:40 -07: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