forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/93582-downsample-persistent-task
- Loading branch information
Showing
78 changed files
with
1,351 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 97700 | ||
summary: Add `completion_time` time field to `async_search` get and status response | ||
area: Search | ||
type: enhancement | ||
issues: | ||
- 88640 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 97703 | ||
summary: Track `max_score` in collapse when requested | ||
area: Search | ||
type: bug | ||
issues: | ||
- 97653 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pr: 97705 | ||
summary: "Fix to stop aggregatable subobjects from being considered multi-fields, to support \ | ||
`\"subobjects\": false` in data frame analytics" | ||
area: Machine Learning | ||
type: bug | ||
issues: | ||
- 88605 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 97711 | ||
summary: Release master service task on timeout | ||
area: Cluster Coordination | ||
type: bug | ||
issues: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
.../yamlRestTest/resources/rest-api-spec/test/search/111_field_collapsing_with_max_score.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
setup: | ||
- skip: | ||
version: " - 8.9.99" | ||
reason: Collapse with max score was fixed in 8.10.0 | ||
features: close_to | ||
|
||
- do: | ||
indices.create: | ||
index: user_comments | ||
body: | ||
settings: | ||
index: | ||
number_of_shards: 1 | ||
mappings: | ||
properties: | ||
user_id: { type: keyword } | ||
comment: { type: text } | ||
|
||
- do: | ||
bulk: | ||
index: user_comments | ||
refresh: true | ||
body: | ||
- '{"index": {"_id": "1"}}' | ||
- '{"user_id": "user1", "comment": "Canada is beautiful."}' | ||
- '{"index": {"_id": "2"}}' | ||
- '{"user_id": "user1", "comment": "Canada is the second-largest country in the world by land area."}' | ||
- '{"index": {"_id": "3"}}' | ||
- '{"user_id": "user2", "comment": "The capital of Canada is Ottawa."}' | ||
- '{"index": {"_id": "4"}}' | ||
- '{"user_id": "user2", "comment": "Canada is cold."}' | ||
- '{"index": {"_id": "5"}}' | ||
- '{"user_id": "user3", "comment": "Canada celebrates Canada Day on July 1st."}' | ||
|
||
--- | ||
"Max score returned when there is no sort": | ||
- do: | ||
search: | ||
index: user_comments | ||
body: | ||
query: | ||
match: | ||
comment: "Canada" | ||
collapse: | ||
field: user_id | ||
|
||
- match: {hits.total.value: 5 } | ||
- length: {hits.hits: 3 } | ||
- match: {hits.hits.0.fields.user_id: ["user3"] } | ||
- close_to: { hits.max_score: { value: 0.11545, error: 0.00001 } } | ||
|
||
--- | ||
"Max score is not returned when there is sort and track_scores is false (by default)": | ||
- do: | ||
search: | ||
index: user_comments | ||
body: | ||
sort: | ||
user_id: asc | ||
query: | ||
match: | ||
comment: "Canada" | ||
collapse: | ||
field: user_id | ||
|
||
- match: {hits.total.value: 5 } | ||
- length: {hits.hits: 3 } | ||
- match: {hits.hits.0.fields.user_id: ["user1"] } | ||
- is_false: hits.max_score | ||
|
||
--- | ||
"Max score returned when there is sort and track_scores is true": | ||
- do: | ||
search: | ||
index: user_comments | ||
body: | ||
sort: | ||
user_id: asc | ||
query: | ||
match: | ||
comment: "Canada" | ||
collapse: | ||
field: user_id | ||
track_scores: true | ||
|
||
- match: {hits.total.value: 5 } | ||
- length: {hits.hits: 3 } | ||
- match: {hits.hits.0.fields.user_id: ["user1"] } | ||
- close_to: { hits.max_score: { value: 0.11545, error: 0.00001 } } | ||
|
||
--- | ||
"Max score returned over all documents not only top hits": | ||
- do: | ||
search: | ||
index: user_comments | ||
body: | ||
size: 2 | ||
sort: | ||
user_id: asc | ||
query: | ||
match: | ||
comment: "Canada" | ||
collapse: | ||
field: user_id | ||
track_scores: true | ||
|
||
- match: {hits.total.value: 5 } | ||
- length: {hits.hits: 2 } | ||
- close_to: { hits.max_score: { value: 0.11545, error: 0.00001 } } | ||
- match: {hits.hits.0.fields.user_id: ["user1"] } | ||
- close_to: { hits.hits.0._score: { value: 0.11030, error: 0.00001 } } | ||
- match: { hits.hits.1.fields.user_id: [ "user2" ] } | ||
- close_to: { hits.hits.1._score: { value: 0.08817, error: 0.00001 } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.