Commit graph

3822 commits

Author SHA1 Message Date
Luca Cavanna
8efd08b019
Upgrade to Lucene 10 (#114741)
The most relevant ES changes that upgrading to Lucene 10 requires are:

- use the appropriate IOContext
- Scorer / ScorerSupplier breaking changes
- Regex automaton are no longer determinized by default
- minimize moved to test classes
- introduce Elasticsearch900Codec
- adjust slicing code according to the added support for intra-segment concurrency
- disable intra-segment concurrency in tests
- adjust accessor methods for many Lucene classes that became a record
- adapt to breaking changes in the analysis area

Co-authored-by: Christoph Büscher <christophbuescher@posteo.de>
Co-authored-by: Mayya Sharipova <mayya.sharipova@elastic.co>
Co-authored-by: ChrisHegarty <chegar999@gmail.com>
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: Armin Braun <me@obrown.io>
Co-authored-by: Panagiotis Bailis <pmpailis@gmail.com>
Co-authored-by: Benjamin Trent <4357155+benwtrent@users.noreply.github.com>
2024-10-21 13:38:23 +02:00
Oleksandr Kolomiiets
16bde51891
Remove IndexMode#isSyntheticSourceEnabled (#114963) 2024-10-18 13:48:12 -07:00
Oleksandr Kolomiiets
16b86a61b1
Remove temporary mutes of compatibility tests (#115140) 2024-10-18 13:37:31 -07:00
Simon Cooper
5faf0cdd90
Remove the min_compatible_shard_node option and associated classes (#114713)
Any similar functionality in the future should use capabilities instead
2024-10-16 13:30:18 +01:00
Niels Bauman
81976b214a
Mark Data Stream Lifecycle APIs to stable (#114780)
Data Stream Lifecycle has GA'ed in 8.14, so we can safely mark these as
stable.
2024-10-15 11:59:12 -03:00
Benjamin Trent
6c752abc23
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.
2024-10-14 20:13:27 -04:00
Rassyan
465c65c02f
Fix Synthetic Source Handling for bit Type in dense_vector Field (#114407)
**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)
2024-10-14 14:59:56 -04:00
Kathleen DeRusso
69b4a9f8ff
Add a query rules tester API call (#114168)
* 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-14 12:55:11 -04:00
Kostas Krikellas
98e0a4e953
Guard second doc parsing pass with index setting (#114649)
* Guard second doc parsing pass with index setting

* add test

* updates

* updates

* merge
2024-10-14 13:03:02 +03:00
Martijn van Groningen
e833e7b6c4
Add feature flag for subobjects auto (#114616) 2024-10-12 18:55:27 +02:00
Joe Gallo
693fb95866
Support IPinfo database configurations (#114548) 2024-10-11 16:31:48 -04:00
Oleksandr Kolomiiets
a62228a744
Allow stored source in logsdb and tsdb (#114454) 2024-10-11 11:16:55 -07:00
Benjamin Trent
589cb8fcbc
Fixing test failure for #114556 (#114617) 2024-10-11 10:55:27 -04:00
Carlos Delgado
73c69b5320
Fix synonyms CI tests timeout (#114476)
* Use synonym index alias, add timeout

* Unmute tests
2024-10-10 10:40:36 +02:00
Iraklis Psaroudakis
21e3a17e5b
Ensure green step in synonyms rule yaml test (#114400)
Fixes test issue serverless 2922.
2024-10-09 18:37:24 +03:00
David Turner
07c3acf1c0
Remove cluster state from /_cluster/reroute response (#114231)
Including the cluster state in responses to the `POST _cluster/state`
API  was deprecated in #90399 (v8.6.0) requiring callers to pass
`?metric=none` to avoid the deprecation warning. This commit adjusts the
behaviour as promised in v9 so that this API never returns the cluster
state, and deprecates the `?metric` parameter itself.

Closes #88978
2024-10-08 07:59:57 +01:00
Pat Whelan
7753c5216a
[ML] Add Streaming Inference spec (#113812)
API for `/_inference/{task_type}/{inference_id}/_stream` and `/_inference/{inference_id}/_stream`

Request is `application/json`
Response is `text/event-stream`
2024-10-07 21:10:36 +02:00
Oleksandr Kolomiiets
3391f5007e
Fix flattened ignore_above tests (#114155)
This fixes tests so that they can work with multiple shards.
2024-10-05 03:38:20 +10:00
Oleksandr Kolomiiets
353ab06655
Remove temporary compatibility test mutes (#114083) 2024-10-04 10:00:55 +10:00
Oleksandr Kolomiiets
987c5a6641
Fix features for synthetic source test (#114070) 2024-10-03 15:29:47 -07:00
Kostas Krikellas
3bfb30b869
Update cluster features for tests with synthetic_source_keep (#114064)
Applied to 8.x too in #114058
2024-10-04 06:56:40 +10:00
Oleksandr Kolomiiets
7facc94be6
Do not expand dots when storing objects in ignored source (#113910) 2024-10-03 13:13:19 -07:00
Kostas Krikellas
dd2024881d
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
2024-10-03 21:19:04 +03:00
Salvatore Campagna
8c509c13c0
Increase number of replicas to enable searching in serverless (#113859) 2024-10-02 17:32:33 +02:00
Kostas Krikellas
c840ea3812
Remove special handling for objects and arrays with dynamic overrides (#113924)
* Remove special handling for objects and arrays with `dynamic` overrides

* add test

* add test
2024-10-02 18:21:54 +03:00
john-wagster
fbf62321ae
Updated Date Range to Follow Documentation When Assuming Missing Values - Remove Skip Tests After Backport (#113951)
* removed skip tests now that backports are in place

* removed skip tests now that backports are in place
2024-10-03 01:17:03 +10:00
David Turner
81bd8667cb
Define owners for UpdateForV9 annotations (#113926)
In order to better track the work needed to prepare this branch for the
major version upgrade, this commit adds a mandatory `owner` field to all
`UpdateForV9` (and `UpdateForV10`) annotations.
2024-10-02 11:37:14 +01:00
David Turner
037d5c3ee7
Fix up test after backport of #113852 (#113883)
This test skip is not needed any more.
2024-10-02 17:53:25 +10:00
Benjamin Trent
8ed0df42f6
Add more dense_vector details for cluster stats field stats (#113607)
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.
2024-10-02 01:58:04 +10:00
David Turner
568aab6496
Reinstate support for GET _cluster/stats?timeout=... (#113852)
Relates #112478
2024-10-01 16:36:12 +01:00
john-wagster
0fbb3bcb45
Updated Date Range to Follow Documentation When Assuming Missing Values (#112258)
* 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
2024-10-01 09:21:47 -05:00
Chris Hegarty
32dde26e49
Upgrade to Lucene 9.12.0 (#113333)
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: Chris Hegarty <chegar999@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 08:39:27 +01:00
Stanislav Malyshev
b26d81c713
Implement remote cluster CCS telemetry (#112478)
* Add remote cluster stats to _cluster/stats
* Implement remote cluster stats polling
* Add docs for the include_remotes part
2024-09-30 11:50:22 -06:00
Simon Cooper
1d373a57e6
Update regexes for the locale deprecation warnings (#113675) 2024-09-30 09:24:33 +01:00
Kostas Krikellas
c9f378da29
Revert "Apply auto-flattening to subobjects: auto (#112092)" (#113692)
* Revert "Apply auto-flattening to `subobjects: auto` (#112092)"

This reverts commit fffe8844

* fix DataGenerationHelper
2024-09-30 10:11:15 +03:00
Oleksandr Kolomiiets
55cab5fa98
Fix ignore_above handling in synthetic source when index level setting is used (#113570) 2024-09-26 13:01:21 -07:00
Jake Landis
888188695a
Bump compatible rest api version to 9/8 (#113151)
This commit bumps the REST API version from 8 to 9. This effectively removes all support for REST API 
compatibility with version 7 (though earlier commits already chipped away at some v7 support).

This also enables REST API compatibility support for version 8, providing support for v8 compatibility headers, 
i.e. "application/vnd.elasticsearch+json;compatible-with=8" and no-op support (no errors) to accept v9 
compatibility headers i.e. "application/vnd.elasticsearch+json;compatible-with=9".

see additional context in the GH PR #113151
2024-09-26 14:52:05 -05:00
Kostas Krikellas
b344493298
Rest skipped tests after backporting (#113591)
The skip test entries were added in
https://github.com/elastic/elasticsearch/pull/113584, no longer needed
after backporting it.
2024-09-26 21:57:31 +10:00
Kostas Krikellas
fffe8844e9
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>
2024-09-26 11:42:40 +03:00
Oleksandr Kolomiiets
35fbbec46a
Fix synthetic source for flattened field when used with ignore_above (#113499) 2024-09-25 14:38:37 -07:00
Mayya Sharipova
c18c531d72
Deprecate legacy params from range query (#113286)
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-25 14:48:45 -04:00
Andrei Dan
4e5e870370
Implement parseBytesRef for TimeSeriesRoutingHashFieldType (#113373)
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`
2024-09-24 09:13:26 +01:00
Salvatore Campagna
208a1fe571
Introduce an ignore_above index-level setting (#113121)
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.
2024-09-23 18:05:02 +02:00
Felix Barnsteiner
8d223cbf7a
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.
2024-09-23 17:31:18 +10:00
Oleksandr Kolomiiets
6b11af38d6
Fix new synthetic source copy_to tests to pass on serverless (#113320) 2024-09-21 09:25:26 +10:00
Oleksandr Kolomiiets
b9855b8e4e
Correctly identify parent of copy_to destination field for synthetic source purposes (#113153) 2024-09-20 12:08:55 -07:00
Luigi Dell'Aquila
5530caa94d
Fix tests with warnings due to date format changes in JDK 23 (#113253)
Adding warnings like

```
Date format [MMMM] contains textual field specifiers that could change in JDK 23
```

to failing tests, due to changes recently introduced about Locale
Provider

Fixes: #113226 Fixes: #113227 Fixes: #113198 Fixes: #113199 Fixes:
#113200
2024-09-20 21:19:27 +10:00
Kostas Krikellas
e244216c0f
Configure keeping source in FieldMapper (#112706)
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-19 23:29:09 +10:00
Kostas Krikellas
4ff4384550
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
2024-09-19 20:07:31 +10:00
Lee Hinman
b94720dca5
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).
2024-09-19 05:29:53 +10:00