Skip to content

Commit d6440b4

Browse files
authored
Merge branch 'main' into enhancement/unmapped_fields_rewrite
2 parents d733d12 + f84ec74 commit d6440b4

File tree

36 files changed

+896
-137
lines changed

36 files changed

+896
-137
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/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

gradle/verification-metadata.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3493,6 +3493,11 @@
34933493
<sha256 value="4b48ea084e5232b9d79ebca1887b9de037b124931807cd60710748c2aee08cc9" origin="Generated by Gradle"/>
34943494
</artifact>
34953495
</component>
3496+
<component group="org.bouncycastle" name="bcpkix-jdk18on" version="1.79">
3497+
<artifact name="bcpkix-jdk18on-1.79.jar">
3498+
<sha256 value="3639a24ddf9ba4b7eba0659b44770e91eba816421888e571f285aadefe532cd6" origin="Generated by Gradle"/>
3499+
</artifact>
3500+
</component>
34963501
<component group="org.bouncycastle" name="bcprov-jdk15on" version="1.60">
34973502
<artifact name="bcprov-jdk15on-1.60.jar">
34983503
<sha256 value="7f1a0e6badab38666f8467a9a0ee96656b2f8ec8623867ed34f3cdc173b7ee07" origin="Generated by Gradle"/>
@@ -3508,6 +3513,11 @@
35083513
<sha256 value="add5915e6acfc6ab5836e1fd8a5e21c6488536a8c1f21f386eeb3bf280b702d7" origin="Generated by Gradle"/>
35093514
</artifact>
35103515
</component>
3516+
<component group="org.bouncycastle" name="bcprov-jdk18on" version="1.79">
3517+
<artifact name="bcprov-jdk18on-1.79.jar">
3518+
<sha256 value="0d81ecc3124536b539bce9aa3fe9621b7f84c9cee371b635a5b31c78b79ab1da" origin="Generated by Gradle"/>
3519+
</artifact>
3520+
</component>
35113521
<component group="org.bouncycastle" name="bctls-fips" version="1.0.19">
35123522
<artifact name="bctls-fips-1.0.19.jar">
35133523
<sha256 value="a0bbad2eb5268f1baa08f0e2e69cb61cd292e19e73595c620d586d335d97d1a8" origin="Generated by Gradle"/>
@@ -3518,6 +3528,11 @@
35183528
<sha256 value="d9fa56f97b0f761ce3bc8d9d74c5d7137a987bf5bd3abfe1003f9bafa45a1d2f" origin="Generated by Gradle"/>
35193529
</artifact>
35203530
</component>
3531+
<component group="org.bouncycastle" name="bcutil-jdk18on" version="1.79">
3532+
<artifact name="bcutil-jdk18on-1.79.jar">
3533+
<sha256 value="c70b88ada58938cbc2f005d40329054078bcfa1149e6ffc03e9242eb6ab21836" origin="Generated by Gradle"/>
3534+
</artifact>
3535+
</component>
35213536
<component group="org.carrot2" name="morfologik-fsa" version="2.1.1">
35223537
<artifact name="morfologik-fsa-2.1.1.jar">
35233538
<sha256 value="c91db33831762a305d6d30fbd4230d9e57798706e25c35222c9bee1eb3e00109" origin="Generated by Gradle"/>

0 commit comments

Comments
 (0)