Skip to content

Commit c0f4d18

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents ff92f92 + 0666462 commit c0f4d18

File tree

152 files changed

+2554
-987
lines changed

Some content is hidden

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

152 files changed

+2554
-987
lines changed

build-tools-internal/gradle/wrapper/gradle-wrapper.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionSha256Sum=7ebdac923867a3cec0098302416d1e3c6c0c729fc4e2e05c10637a8af33a76c5
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
3+
distributionSha256Sum=296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-all.zip
55
networkTimeout=10000
66
validateDistributionUrl=true
77
zipStoreBase=GRADLE_USER_HOME
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.12
1+
8.12.1

docs/README.asciidoc

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,15 @@ used for its modifiers:
157157
* `// TESTRESPONSE[skip:reason]`: Skip the assertions specified by this
158158
response.
159159
* `// TESTSETUP`: Marks this snippet as the "setup" for all other snippets in
160-
this file. This is a somewhat natural way of structuring documentation. You
161-
say "this is the data we use to explain this feature" then you add the
162-
snippet that you mark `// TESTSETUP` and then every snippet will turn into
163-
a test that runs the setup snippet first. See the "painless" docs for a file
164-
that puts this to good use. This is fairly similar to `// TEST[setup:name]`
165-
but rather than the setup defined in `docs/build.gradle` the setup is defined
166-
right in the documentation file. In general, we should prefer `// TESTSETUP`
167-
over `// TEST[setup:name]` because it makes it more clear what steps have to
168-
be taken before the examples will work. Tip: `// TESTSETUP` can only be used
169-
on the first snippet of a document.
160+
this file. In order to enhance clarity and simplify understanding for readers,
161+
a straightforward approach involves marking the first snippet in the documentation file with the
162+
`// TESTSETUP` marker. By doing so, it clearly indicates that this particular snippet serves as the setup
163+
or preparation step for all subsequent snippets in the file.
164+
This helps in explaining the necessary steps that need to be executed before running the examples.
165+
Unlike the alternative convention `// TEST[setup:name]`, which relies on a setup defined in a separate file,
166+
this convention brings the setup directly into the documentation file, making it more self-contained and reducing ambiguity.
167+
By adopting this convention, users can easily identify and follow the correct sequence
168+
of steps to ensure that the examples provided in the documentation work as intended.
170169
* `// TEARDOWN`: Ends and cleans up a test series started with `// TESTSETUP` or
171170
`// TEST[setup:name]`. You can use `// TEARDOWN` to set up multiple tests in
172171
the same file.

docs/changelog/120291.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 120291
2+
summary: ESQL - Allow full text functions disjunctions for non-full text functions
3+
area: ES|QL
4+
type: feature
5+
issues: []

docs/changelog/120527.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/changelog/120930.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 120930
2+
summary: Normalize negative scores for `text_similarity_reranker` retriever
3+
area: Ranking
4+
type: bug
5+
issues:
6+
- 120201

docs/changelog/120937.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 120937
2+
summary: Use the system index descriptor in the snapshot blob cache cleanup task
3+
area: Snapshot/Restore
4+
type: bug
5+
issues:
6+
- 120518

docs/reference/esql/esql-limitations.asciidoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ it is necessary to use the search function, like <<esql-match>>, in a <<esql-whe
112112
directly after the <<esql-from>> source command, or close enough to it.
113113
Otherwise, the query will fail with a validation error.
114114
Another limitation is that any <<esql-where>> command containing a full-text search function
115-
cannot also use disjunctions (`OR`) unless all functions used in the OR clauses are full-text functions themselves.
115+
cannot use disjunctions (`OR`), unless:
116+
117+
* All functions used in the OR clauses are full-text functions themselves, or scoring is not used
116118

117119
For example, this query is valid:
118120

@@ -131,19 +133,27 @@ FROM books
131133
| WHERE MATCH(author, "Faulkner")
132134
----
133135

134-
And this query will fail due to the disjunction:
136+
And this query that uses a disjunction will succeed:
135137

136138
[source,esql]
137139
----
138140
FROM books
141+
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
142+
----
143+
144+
However using scoring will fail because it uses a non full text function as part of the disjunction:
145+
146+
[source,esql]
147+
----
148+
FROM books METADATA _score
139149
| WHERE MATCH(author, "Faulkner") OR author LIKE "Hemingway"
140150
----
141151

142-
However this query will succeed because it uses full text functions on both `OR` clauses:
152+
Scoring will work in the following query, as it uses full text functions on both `OR` clauses:
143153

144154
[source,esql]
145155
----
146-
FROM books
156+
FROM books METADATA _score
147157
| WHERE MATCH(author, "Faulkner") OR QSTR("author: Hemingway")
148158
----
149159

docs/reference/search/retriever.asciidoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,23 @@ You have the following options:
523523
** Then set up an <<inference-example-eland,{es} service inference endpoint>> with the `rerank` task type.
524524
** Refer to the <<text-similarity-reranker-retriever-example-eland,example>> on this page for a step-by-step guide.
525525

526+
[IMPORTANT]
527+
====
528+
Scores from the re-ranking process are normalized using the following formula before returned to the user,
529+
to avoid having negative scores.
530+
[source,text]
531+
----
532+
score = max(score, 0) + min(exp(score), 1)
533+
----
534+
Using the above, any initially negative scores are projected to (0, 1) and positive scores to [1, infinity).
535+
To revert back if needed, one can use:
536+
[source, text]
537+
----
538+
score = score - 1, if score >= 0
539+
score = ln(score), if score < 0
540+
----
541+
====
542+
526543
===== Parameters
527544

528545
`retriever`::

docs/reference/search/search-your-data/search-with-synonyms.asciidoc

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,35 @@ The following example adds `my_analyzer` as a search analyzer to the `title` fie
145145

146146
[source,JSON]
147147
----
148+
{
148149
"mappings": {
149150
"properties": {
150151
"title": {
151152
"type": "text",
152-
"search_analyzer": "my_analyzer",
153-
"updateable": true
153+
"search_analyzer": "my_analyzer"
154+
}
155+
}
156+
},
157+
"settings": {
158+
"analysis": {
159+
"analyzer": {
160+
"my_analyzer": {
161+
"tokenizer": "whitespace",
162+
"filter": [
163+
"synonyms_filter"
164+
]
165+
}
166+
},
167+
"filter": {
168+
"synonyms_filter": {
169+
"type": "synonym",
170+
"synonyms_path": "analysis/synonym-set.txt",
171+
"updateable": true
172+
}
154173
}
155174
}
156175
}
176+
}
157177
----
158178

159179

0 commit comments

Comments
 (0)