Skip to content

Commit 4bda255

Browse files
authored
Merge branch 'main' into unmute-ip-tests
2 parents 7cfc08f + 8686ad7 commit 4bda255

File tree

50 files changed

+1046
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1046
-165
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
# claude
3+
.claude
4+
25
# intellij files
36
.idea/
47
*.iml

build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/InternalDistributionDownloadPluginFuncTest.groovy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ class InternalDistributionDownloadPluginFuncTest extends AbstractGradleFuncTest
167167
}
168168
}
169169
}
170+
171+
tasks.named('assemble').configure {
172+
dependsOn buildTar
173+
}
174+
170175
artifacts {
171176
it.add("default", buildTar)
172177
it.add("extracted", buildExpanded)

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionArchiveSetupPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private void registerAndConfigureDistributionArchivesExtension(Project project)
7474
project.project(subProjectName, sub -> {
7575
sub.getPlugins().apply(BasePlugin.class);
7676
sub.getArtifacts().add(DEFAULT_CONFIGURATION_NAME, distributionArchive.getArchiveTask());
77+
sub.getTasks().named("assemble").configure(task -> task.dependsOn(distributionArchive.getArchiveTask()));
7778
var extractedConfiguration = sub.getConfigurations().create(EXTRACTED_CONFIGURATION_NAME);
7879
extractedConfiguration.setCanBeResolved(false);
7980
extractedConfiguration.setCanBeConsumed(true);

build-tools-internal/version.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ reactive_streams = 1.0.4
2222

2323
antlr4 = 4.13.1
2424
# bouncy castle version for non-fips. fips jars use a different version
25-
bouncycastle=1.78.1
25+
bouncycastle=1.79
2626
# used by security and idp (need to be in sync due to cross-dependency in testing)
2727
opensaml = 4.3.0
2828

distribution/packages/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,10 @@ tasks.register('buildDeb', Deb) {
354354
configure(commonDebConfig('x64'))
355355
}
356356

357+
tasks.named('assemble'){
358+
dependsOn 'buildDeb', 'buildAarch64Deb'
359+
}
360+
357361
Closure commonRpmConfig(String architecture) {
358362
return {
359363
configure(commonPackageConfig('rpm', architecture))
@@ -387,6 +391,11 @@ tasks.register('buildRpm', Rpm) {
387391
configure(commonRpmConfig('x64'))
388392
}
389393

394+
tasks.named('assemble'){
395+
dependsOn 'buildRpm', 'buildAarch64Rpm'
396+
}
397+
398+
390399
Closure dpkgExists = { it -> new File('/bin/dpkg-deb').exists() || new File('/usr/bin/dpkg-deb').exists() || new File('/usr/local/bin/dpkg-deb').exists() }
391400
Closure rpmExists = { it -> new File('/bin/rpm').exists() || new File('/usr/bin/rpm').exists() || new File('/usr/local/bin/rpm').exists() }
392401

docs/changelog/129693.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 129693
2+
summary: Add top level normalizer for linear retriever
3+
area: Search
4+
type: enhancement
5+
issues: []

docs/changelog/130325.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
pr: 130325
2+
summary: "Simulate API: Return 400 on invalid processor(s)"
3+
area: Ingest Node
4+
type: bug
5+
issues:
6+
- 120731
7+
breaking:
8+
title: Return 400 on invalid processor(s) in Simulate API
9+
area: Ingest
10+
details: "In earlier versions of {es}, the Simulate API would return a 500 error\
11+
\ when encountering invalid processors. Now, it returns a 400 Bad Request error\
12+
\ instead."
13+
impact: Callers should expect a 400 Bad Request response when the Simulate API encounters
14+
invalid processors. This change improves error handling and provides clearer feedback
15+
on request issues.
16+
notable: false

docs/changelog/132853.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 132853
2+
summary: Bump bcpkix version
3+
area: Security
4+
type: upgrade
5+
issues: []

docs/reference/elasticsearch/rest-apis/retrievers/linear-retriever.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,16 @@ Combining `query` and `retrievers` is not supported.
3131
`normalizer` {applies_to}`stack: ga 9.1`
3232
: (Optional, String)
3333

34-
The normalizer to use when using the [multi-field query format](../retrievers.md#multi-field-query-format).
34+
The top-level normalizer to use when combining results.
3535
See [normalizers](#linear-retriever-normalizers) for supported values.
3636
Required when `query` is specified.
37+
38+
When used with the [multi-field query format](../retrievers.md#multi-field-query-format) (`query` parameter), normalizes scores per [field grouping](../retrievers.md#multi-field-field-grouping).
39+
Otherwise serves as the default normalizer for any sub-retriever that doesn't specify its own normalizer. Per-retriever normalizers always take precedence over the top-level normalizer.
40+
41+
:::{note}
42+
**Top-level normalizer support for sub-retrievers**: The ability to use a top-level normalizer as a default for sub-retrievers was introduced in Elasticsearch 9.2+. In earlier versions, only per-retriever normalizers are supported.
43+
:::
3744

3845
::::{warning}
3946
Avoid using `none` as that will disable normalization and may bias the result set towards lexical matches.
@@ -74,9 +81,10 @@ Each entry in the `retrievers` array specifies the following parameters:
7481
`normalizer`
7582
: (Optional, String)
7683

77-
Specifies how the retrievers score will be normalized before applying the specified `weight`.
84+
Specifies how the retriever's score will be normalized before applying the specified `weight`.
7885
See [normalizers](#linear-retriever-normalizers) for supported values.
79-
Defaults to `none`.
86+
If not specified, uses the top-level `normalizer` or defaults to `none` if no top-level normalizer is set.
87+
{applies_to}`stack: ga 9.2`
8088

8189
See also [this hybrid search example](retrievers-examples.md#retrievers-examples-linear-retriever) using a linear retriever on how to independently configure and apply normalizers to retrievers.
8290

@@ -94,7 +102,7 @@ The `linear` retriever supports the following normalizers:
94102
95103
## Example
96104
97-
This example of a hybrid search weights KNN results five times more heavily than BM25 results in the final ranking.
105+
This example of a hybrid search weights KNN results five times more heavily than BM25 results in the final ranking, with a top-level normalizer applied to all retrievers.
98106
99107
```console
100108
GET my_index/_search
@@ -105,23 +113,33 @@ GET my_index/_search
105113
{
106114
"retriever": {
107115
"knn": {
108-
...
116+
"field": "title_vector",
117+
"query_vector": [0.1, 0.2, 0.3],
118+
"k": 10,
119+
"num_candidates": 100
109120
}
110121
},
111122
"weight": 5 # KNN query weighted 5x
112123
},
113124
{
114125
"retriever": {
115126
"standard": {
116-
...
127+
"query": {
128+
"match": {
129+
"title": "elasticsearch"
130+
}
131+
}
117132
}
118133
},
119134
"weight": 1.5 # BM25 query weighted 1.5x
120135
}
121-
]
136+
],
137+
"normalizer": "minmax"
122138
}
123139
}
124140
}
125141
```
126142

143+
In this example, the `minmax` normalizer is applied to both the kNN retriever and the standard retriever. The top-level normalizer serves as a default that can be overridden by individual sub-retrievers. When using the multi-field query format, the top-level normalizer is applied to all generated inner retrievers.
144+
127145
See also [this hybrid search example](retrievers-examples.md#retrievers-examples-linear-retriever).

docs/reference/elasticsearch/rest-apis/searching-with-query-rules.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@ $$$query-rules$$$
1616
* Personalized metadata about users (e.g. country, language, etc)
1717
* A particular topic
1818
* A referring site
19-
* etc.
19+
2020

2121
Query rules define a metadata key that will be used to match the metadata provided in the [rule retriever](/reference/elasticsearch/rest-apis/retrievers/rule-retriever.md) with the criteria specified in the rule.
2222

2323
When a query rule matches the rule metadata according to its defined criteria, the query rule action is applied to the underlying `organic` query.
2424

2525
For example, a query rule could be defined to match a user-entered query string of `pugs` and a country `us` and promote adoptable shelter dogs if the rule query met both criteria.
2626

27-
Rules are defined using the [query rules API](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-query_rules) and searched using the [rule retriever](/reference/elasticsearch/rest-apis/retrievers/rule-retriever.md) or the [rule query](/reference/query-languages/query-dsl/query-dsl-rule-query.md).
27+
You can create and manage query rules using either:
28+
- [Query rules API]({{es-apis}}v9/group/endpoint-query_rules)
29+
- [Query Rules UI](docs-content://solutions/search/query-rules-ui.md)
2830

31+
You can search with query rules using either:
32+
- [Retrievers syntax](/reference/elasticsearch/rest-apis/retrievers/rule-retriever.md)
33+
- [Query DSL syntax](/reference/query-languages/query-dsl/query-dsl-rule-query.md)
2934

3035
## Rule definition [query-rule-definition]
3136

@@ -68,7 +73,7 @@ The actions to take when the rule matches a query:
6873
Use `ids` when searching over a single index, and `docs` when searching over multiple indices. `ids` and `docs` cannot be combined in the same query.
6974

7075

71-
## Add query rules [add-query-rules]
76+
## Manage query rules [manage-query-rules]
7277

7378
You can add query rules using the [Create or update query ruleset](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset) call. This adds a ruleset containing one or more query rules that will be applied to queries that match their specified criteria.
7479

@@ -145,6 +150,8 @@ There is a limit of 100 rules per ruleset. This can be increased up to 1000 usin
145150

146151
You can use the [Get query ruleset](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset) call to retrieve the ruleset you just created, the [List query rulesets](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets) call to retrieve a summary of all query rulesets, and the [Delete query ruleset](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset) call to delete a query ruleset.
147152

153+
To manage rules using the Query Rules UI, refer to [Manage query rules](https://www.elastic.co/docs/solutions/search/query-rules-ui#manage-existing-rules).
154+
148155

149156
## Search using query rules [rule-query-search]
150157

0 commit comments

Comments
 (0)