Commit graph

18046 commits

Author SHA1 Message Date
Carlos Delgado
968bddc462
Non existing synonyms sets do not fail shard recovery (#125659) 2025-03-27 18:04:20 +02:00
Dimitris Rempapis
6a9d765408
Minor-Fixes Support 7x segments as archive in 8x / 9x (#125666)
Minor fixes to support 7x segments as archive in 8x / 9x
2025-03-27 16:28:23 +02:00
Jordan Powers
689eaf20f4
Store arrays offsets for unsigned long fields natively with synthetic source (#125709)
This patch builds on the work in #113757, #122999, #124594, and #125529 to
natively store array offsets for unsigned long fields instead of falling
back to ignored source when synthetic_source_keep: arrays.
2025-03-27 00:59:24 +02:00
Benjamin Trent
dd58b0b6fa
Return appropriate error on null dims update instead of npe (#125716)
Calling `Object::toString` was trying to call `null.toString()`, really
it should have been `Objects::toString`, which accepts `null`.

closes: https://github.com/elastic/elasticsearch/issues/125713
2025-03-27 08:47:20 +11:00
Benjamin Trent
009a86a0e3
Allow zero for rescore_vector.oversample to indicate by-passing oversample and rescoring (#125599)
This allows a `rescore_vector: {oversample: 0}` to indicate bypassing
oversampling and rescoring. 

This is useful for:

 - Updating a quantized mapping to turn off automatic rescoring
 - Bypassing oversampling at query time in an ad-hoc manner if its on by default in the mapping

closes: https://github.com/elastic/elasticsearch/issues/125157
2025-03-27 06:56:51 +11:00
Fang Xing
80125a4bac
[ES|QL] Make numberOfChannels consistent with layout map by removing duplicated ChannelSet (#125636)
* make numberOfChannels consistent with layout
2025-03-26 14:51:23 -04:00
Larisa Motova
10719831b5
[ES|QL] Add ToAggregateMetricDouble example (#125518)
Adds AggregateMetricDouble to the ES|QL CSV tests and examples of how to
use the ToAggregateMetricDouble function
2025-03-26 07:56:48 -10:00
Armin Braun
632b9e79bd
Load FieldInfos from store if not yet initialised through a refresh on IndexShard (#125650)
Load field caps from store if they haven't been initialised through a refresh yet.
Keep the plain reads to not mess with performance characteristics too much on the good path but protect against confusing races when loading field infos now (that probably should have been ordered stores in the first place but this was safe due to other locks/volatiles on the refresh path).

Closes #125483
2025-03-26 18:54:21 +01:00
Stanislav Malyshev
07921a78a6
Handle long overflow in dates (#124048)
* Handle long overflow in dates
2025-03-26 18:57:04 +02:00
Bogdan Pintea
b6b8159ed9
SQL: Docs: Drop examples of LIKE/RLIKE vs QUERY/MATCH equivalence (#125673)
This drops the examples of LIKE/RLIKE vs QUERY/MATCH equivalence.
2025-03-27 03:28:38 +11:00
Karen Metts
f0168b4b84
Doc: Update links to logstash plugin docs (#125675)
* Add logstash plugin repo to cross_links
2025-03-26 11:54:37 -04:00
Tommaso Teofili
7a610c30fd
[docs] nested knn only supports score_mode max (#125582)
* [docs] nested knn only supports score_mode max
2025-03-26 11:31:43 +01:00
Nik Everett
f097818fa5
ESQL: Report original_types (#124913)
Adds the `original_types` to the description of ESQL's `unsupported`
fields. This looks like:

```
    {
      "name" : "a",
      "type" : "unsupported",
      "original_types" : [
        "long",
        "text"
      ]
    }
```

for union types. And like:

```
    {
      "name" : "a",
      "type" : "unsupported",
      "original_types" : [
        "date_range"
      ]
    }
```

for truly unsupported types.

This information is useful for the UI. For union types it can suggest
that users append a cast.
2025-03-26 13:21:53 +11:00
Yang Wang
6be0bf50bb
Minor update to interal distributed guide for multi-project (#125556)
This PR adds a minimal amount information about multi-project so that
the existing distributed guide is up-to-date.

Relates: https://github.com/elastic/elasticsearch/pull/123565 Resolves:
ES-10985
2025-03-26 12:48:20 +11:00
Nick Tindall
073ca0e888
Upgrade to latest GCS SDK (#124062)
Upgrades google cloud SDK used by repository-gcp to com.google.cloud:google-cloud-storage-bom:2.50.0

Closes: ES-9287
2025-03-26 11:08:14 +11:00
Ryan Ernst
d4aa1e66de
Rename deprecation index template (#125606)
The dataset name for the deprecation logs index was previously renamed
from `deprecation.elasticsearch` to `elasticsearch.deprecation` in
order to follow the pattern of `product.group`. The deprecation index
template, however, was not updated. This causes indexing errors once
upgraded to 9.0 due to the dataset name having changed on a
constant_keyword field. In order to avoid that mismatch, this commit
renames the deprecation indexing datastream to match the dataset name.
The old template is kept in place, but marked as deprecated, so that any
deprecation logs written during upgrading to 9.x will continue to be
indexed into the old datastream.

closes #125445
2025-03-25 14:16:49 -07:00
Mark Tozzi
2e6e71ac9b
Esql - Fix lucene push down behavior when a range contains nanos and millis (#125595)
Follow up to #125345. If the query contained both a nanos and a millis comparison, we were formatting the dates incorrectly for the lucene push down. This PR adds a test and a fix for that case.
---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-03-25 21:22:08 +02:00
Mark Vieira
65751062f7
Re-enable VerifyVersionConstantsIT (#125605) 2025-03-25 12:16:53 -07:00
Ying Mao
a6f685cc2a
Adding common rerank options to Perform Inference API (#125239)
* wip

* Adding rerank common options

* Linting

* Linting

* [CI] Auto commit changes from spotless

* Update docs/changelog/125239.yaml

* PR feedback

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-03-25 12:32:18 -04:00
Jordan Powers
af1f1452d7
Store arrays offsets for boolean fields natively with synthetic source (#125529)
This patch builds on the work in #113757, #122999, and #124594 to natively
store array offsets for boolean fields instead of falling back to ignored
source when `synthetic_source_keep: arrays`.
2025-03-25 08:59:59 -07:00
elasticsearchmachine
22c79a3de8 Prune changelogs after 8.17.4 release 2025-03-25 15:25:29 +00:00
Simon Cooper
7f1203e472
Add panama implementations of byte-bit and float-bit script operations (#124722) 2025-03-25 13:59:11 +00:00
Iván Cea Fontenla
bd04d1fe1c
ESQL: Calculate concurrent node limit (#124901) 2025-03-25 13:59:36 +01:00
elasticsearchmachine
2b5200fac8 Prune changelogs after 8.16.6 release 2025-03-25 12:26:17 +00:00
Colleen McGinnis
209bf8c3bb
[docs] update release note template language and titles (#125548) 2025-03-25 09:31:22 +01:00
Mark Tozzi
30a56d6e2c
ESQL - date nanos range bug? (#125345)
Fixes #125439

We were incorrectly formatting nanosecond dates when building lucene queries. We had missed this in our testing because none of the CSV tests were running against Lucene. This happened because the date nanos test data includes multivalue fields. Our warning behavior for multivalue fields is inconsistent between queries run in Lucene and queries run in pure ES|QL without pushdown. Our warning tests, however, require that the specified warnings be present in all execution paths. When we first built the date nanos CSV tests, we worked around this by always using an MV function to unpack the multivalue fields. But we forgot that using an MV function prevents the entire query from being pushed down to Lucene, and thus that path wasn't being tested.

In this PR, I've duplicated many of the tests to have a version that doesn't use the MV function, and uses warningRegex instead of warning. The regex version does not fail if the header is absent, so it's safe to use in both modes. Rewriting the tests this way revealed several situations in which this bug can manifest, all of which are fixed in this PR. I cannot be confidant that there aren't more paths that can trigger this bug and aren't covered by these tests, but I haven't found any yet.

I've left some trace level logging that I found helpful while debugging this.

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
2025-03-25 00:23:39 +02:00
Colleen McGinnis
162763bd13
[docs] More updates for docs-assembler (#125509)
* update docset.yml, add reference/toc.yml, update reference/elasticsearch/index.md

* Update docs/docset.yml

* add index.md
2025-03-24 14:20:14 -05:00
Niels Bauman
e68587acb6
Process ILM cluster state updates on another thread (#123712)
Instead of processing cluster state updates on the cluster state applier
thread, we fork to a different thread where ILM's runtime of processing
the cluster state update does not affect the speed at which the cluster
can apply new cluster states. That does not mean we don't need to
optimize ILM's cluster state processing, as the overall amount of
processing is generally unaffected by this fork approach (unless we skip
some cluster states), but it does mean we're saving a significant amount
of processing on the critical cluster state applier thread.

Additionally, by running ILM's state processing asynchronously, we allow
ILM to skip some cluster states if the management thread pool is
saturated or ILM's processing is taking too long.
2025-03-24 17:13:57 +01:00
Alexander Spies
f8536aadda
ESQL: Add more details on ENRICH vs. LOOKUP JOIN to docs (#125487)
* Add more details on ENRICH vs. LOOKUP JOIN
* Move example, fix syntax formatting
2025-03-24 16:26:28 +01:00
mushaoqiong
df84065205
Avoid creating known_fields for every check in Alias (#124690)
* avoid creating known_fields for every check

* add changelog

---------

Co-authored-by: 广富 <shaoqiong.msq@alibaba-inc.com>
Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com>
2025-03-24 08:22:34 -06:00
Mike Pellegrini
019ce3fb81
Fix Semantic Text 8.x Upgrade Bug (#125446) 2025-03-24 09:15:54 -04:00
David Kyle
9ec61d52fb
[ML] Return a Conflict status code if the model deployment is stopped by a user (#125204) 2025-03-24 12:28:50 +00:00
Craig Taverner
8ffecb408d
Additional support for docs for ES|QL operators and version-specific differentiation (#125251)
This PR was originally focused on improving support for Kibana docs, in particular the missing operator docs, but it has expanded to cover a bunch of related things:

* Primarily the main work was to improve operators support. ESQL generated docs cover all functions and most operators for which their is a clear operator class and test class. However, some are built-in behaviour and need additional support. This PR adds more generated content for those operators.
* Various specific operators requested by Kibana: Cast & null-predicates, and in particular the addition of examples
* Two functions without examples: mv_append and to_date_nanos
* Many small visual document cleanups (spelling, grammar, capitalization, etc.)
* Initial support for `applies_to` for multi-version differentiation.

This last point requires more work, as it is not yet agreed on just how we want this to look. We'll probably need to do refinements in followup PR. Consider the version in this PR as a first step into how this could look.
2025-03-24 09:56:45 +01:00
Niels Bauman
f7d7ce7ccc
Run TransportGetDataStreamOptionsAction on local node (#125213)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

Relates #101805
2025-03-22 16:18:28 +02:00
Niels Bauman
bbc47d9cad
Run TransportGetDataStreamLifecycleAction on local node (#125214)
This action solely needs the cluster state, it can run on any node.
Additionally, it needs to be cancellable to avoid doing unnecessary work
after a client failure or timeout.

Relates #101805
2025-03-22 13:00:47 +02:00
Niels Bauman
fdd453734d
Fix NPE in rolling over unknown target and return 404 (#125352)
Since #122905 we were throwing NPEs (i.e. 5xxs) when a rollover request has an unknown/non-existent target. Before that, we returned a 400 - illegal argument exception. We now return a 404 which matches "missing target" better. Additionally, to avoid this from happening again, we add a YAML test that asserts the correct exception behavior.
2025-03-22 12:59:13 +02:00
Jeremy Dahlgren
d7995975d9
Add cache support in TransportGetAllocationStatsAction (#124898)
Adds a new cache and setting
TransportGetAllocationStatsAction.CACHE_TTL_SETTING
"cluster.routing.allocation.stats.cache.ttl" to configure the max age
for cached NodeAllocationStats on the master.  The default
value is currently 1 minute per the suggestion in issue 110716.

Closes #110716
2025-03-21 20:35:40 +02:00
Nik Everett
c5e76847ad
ESQL: Keep ordinals in conversion functions (#125357)
Make the conversion functions that process `BytesRef`s into `BytesRefs`
keep the `OrdinalBytesRefVector`s when processing. Let's use `TO_LOWER`
as an example. First, the performance numbers:
```
  (operation)  Mode   Score   Error ->  Score    Error Units
     to_lower  30.662 ± 6.163 -> 30.048 ±  0.479 ns/op
to_lower_ords  30.773 ± 0.370 ->  0.025 ±  0.001 ns/op
     to_upper  33.552 ± 0.529 -> 35.775 ±  1.799 ns/op
to_upper_ords  35.791 ± 0.658 ->  0.027 ±  0.001 ns/op
```
The test has a 8192 positions containing alternating `foo` and `bar`.
Running `TO_LOWER` via ordinals is super duper faster. No longer
`O(positions)` and now `O(unique_values)`.

Let's paint some pictures! `OrdinalBytesRefVector` is a lookup table.
Like this:
```
+-------+----------+
| bytes | ordinals |
| ----- | -------- |
|  FOO  | 0        |
|  BAR  | 1        |
|  BAZ  | 2        |
+-------+ 1        |
        | 1        |
        | 0        |
        +----------+
```

That lookup table is one block. When you read it you look up the
`ordinal` and match it to the `bytes`. Previously `TO_LOWER` would
process each value one at a time and make:
```
bytes
-----
 foo
 bar
 baz
 bar
 bar
 foo
```

So it'd run `TO_LOWER` once per `ordinal` and it'd make an ordinal
non-lookup table. With this change `TO_LOWER` will now make:
```
+-------+----------+
| bytes | ordinals |
| ----- | -------- |
|  foo  | 0        |
|  bar  | 1        |
|  baz  | 2        |
+-------+ 1        |
        | 1        |
        | 0        |
        +----------+
```
We don't even have to copy the `ordinals` - we can reuse those from the
input and just bump the reference count. That's why this goes from
`O(positions)` to `O(unique_values)`.
2025-03-21 20:00:15 +02:00
Nik Everett
e897a1422f
Aggs: Let terms run in global ords mode no match (#124782)
Allows the `terms` agg to run with global ords if the top level query
matches no docs *but* the agg is configured to collect buckets with 0
docs.
2025-03-21 13:00:25 -04:00
Liam Thompson
397c9c59c7
Clarify regex character range case insensitivity limitations (#125413)
* Update regexp-syntax.md

9.x equivalent of https://github.com/elastic/elasticsearch/pull/125412

* use md syntax
2025-03-21 18:43:44 +02:00
Jim Ferenczi
a26bbe25bf
Set default similarity for Cohere model to cosine (#125370)
Cohere embeddings are expected to be normalized to unit vectors, but due to floating point precision issues,
our check ({@link DenseVectorFieldMapper#isNotUnitVector(float)}) often fails.
This change fixes this bug by setting the default similarity for newly created Cohere inference endpoint to cosine.

Closes #122878
2025-03-21 12:23:26 +00:00
kanoshiou
1d6a77c7cb
ESQL: Fail in AggregateFunction when LogicPlan is not an Aggregate (#124446) 2025-03-21 13:13:24 +01:00
Dimitris Rempapis
9dfe7ab75f
Support 7x segments as archive in 8x / 9x (#119503)
Added BWCLucene8*Codecs wrapper classes for the  lucene8* equivalents. A BWC wrapper is initialized for archive indices and provides read-only capabilities for an index.
2025-03-21 12:32:01 +02:00
Carlos Delgado
160ac698d7
ES|QL: Add default values for match function options (#125282) 2025-03-21 10:44:41 +01:00
Lorenzo Dematté
3558a288f6
Update plugins documentation for Entitlements (#125292)
This PR updates the documentation for Creating classic plugins, replacing the instructions relative to the Java SecurityManager with information on Entitlements.

Relates to ES-10846
2025-03-21 10:31:06 +02:00
Colleen McGinnis
9bcd59596d
[docs] Prepare for docs-assembler (#125118)
* reorg files for docs-assembler and create toc.yml files

* fix build error, add redirects

* only toc

* move images
2025-03-20 12:09:12 -05:00
Dan Rubinstein
52bc96240c
Fix AlibabaCloudSearchCompletionAction not accepting ChatCompletionInputs (#125023)
* Fix AlibabaCloudSearchCompletionAction not accepting ChatCompletionInputs

* Update docs/changelog/125023.yaml

* Fix unit tests
2025-03-20 13:07:58 -04:00
kanoshiou
873827db12
ESQL: Align RENAME behavior with EVAL for sequential processing (#122250) 2025-03-20 17:04:13 +01:00
Keith Massey
24132d3834
Reindex data stream indices on different nodes (#125171) 2025-03-20 07:50:10 -05:00
Mike Pellegrini
f67b5d6e95
Mark semantic text as GA in docs (#124669) 2025-03-20 08:13:00 -04:00