Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/changelog/116970.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pr: 116970
summary: Remove legacy params from range query
area: Search
type: breaking
issues: []
breaking:
title: Remove legacy params from range query
area: REST API
details: The deprecated range query parameters `to`, `from`, `include_lower`, and `include_upper` are no longer supported.
impact: Users should use `lt`, `lte`, `gt`, and `gte` query parameters instead.
notable: false
4 changes: 0 additions & 4 deletions modules/rank-eval/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,3 @@ testClusters.configureEach {
// Modules who's integration is explicitly tested in integration tests
module ':modules:lang-mustache'
}

tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTest("rank_eval/30_failures/Response format", "warning does not exist for compatibility")
})
4 changes: 0 additions & 4 deletions modules/runtime-fields-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,3 @@ dependencies {
api project(':libs:grok')
api project(':libs:dissect')
}

tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTestsByFilePattern("**/runtime_fields/110_composite.yml", "warning does not exist for compatibility")
})
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ tests:
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=mtermvectors/10_basic/Tests catching other exceptions per item}
issue: https://github.com/elastic/elasticsearch/issues/113325
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=search/500_date_range/from, to, include_lower, include_upper deprecated}
issue: https://github.com/elastic/elasticsearch/pull/113286
- class: org.elasticsearch.integration.KibanaUserRoleIntegTests
method: testFieldMappings
issue: https://github.com/elastic/elasticsearch/issues/113592
Expand Down
1 change: 1 addition & 0 deletions rest-api-spec/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ tasks.named("yamlRestCompatTestTransform").configure ({ task ->
task.replaceValueInMatch("profile.shards.0.dfs.knn.0.query.0.description", "DocAndScoreQuery[0,...][0.009673266,...],0.009673266", "dfs knn vector profiling with vector_operations_count")
task.skipTest("cat.aliases/10_basic/Deprecated local parameter", "CAT APIs not covered by compatibility policy")
task.skipTest("cat.shards/10_basic/Help", "sync_id is removed in 9.0")
task.skipTest("search/500_date_range/from, to, include_lower, include_upper deprecated", "deprecated parameters are removed in 9.0")
})
Original file line number Diff line number Diff line change
Expand Up @@ -123,29 +123,3 @@ setup:
- match: { hits.total: 1 }
- length: { hits.hits: 1 }
- match: { hits.hits.0._id: "4" }


---
"from, to, include_lower, include_upper deprecated":
- requires:
cluster_features: "gte_v8.16.0"
reason: 'from, to, include_lower, include_upper parameters are deprecated since 8.16.0'
test_runner_features: warnings

- do:
warnings:
- "Deprecated field [from] used, this field is unused and will be removed entirely"
- "Deprecated field [to] used, this field is unused and will be removed entirely"
- "Deprecated field [include_lower] used, this field is unused and will be removed entirely"
- "Deprecated field [include_upper] used, this field is unused and will be removed entirely"
search:
index: dates
body:
sort: field
query:
range:
date:
from: 1000
to: 2023
include_lower: false
include_upper: false
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ public class RangeQueryBuilder extends AbstractQueryBuilder<RangeQueryBuilder> i

public static final ParseField LTE_FIELD = new ParseField("lte");
public static final ParseField GTE_FIELD = new ParseField("gte");
public static final ParseField FROM_FIELD = new ParseField("from").withAllDeprecated();
public static final ParseField TO_FIELD = new ParseField("to").withAllDeprecated();
private static final ParseField INCLUDE_LOWER_FIELD = new ParseField("include_lower").withAllDeprecated();
private static final ParseField INCLUDE_UPPER_FIELD = new ParseField("include_upper").withAllDeprecated();
public static final ParseField GT_FIELD = new ParseField("gt");
public static final ParseField LT_FIELD = new ParseField("lt");
private static final ParseField TIME_ZONE_FIELD = new ParseField("time_zone");
Expand Down Expand Up @@ -367,15 +363,7 @@ public static RangeQueryBuilder fromXContent(XContentParser parser) throws IOExc
if (token == XContentParser.Token.FIELD_NAME) {
currentFieldName = parser.currentName();
} else {
if (FROM_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
from = maybeConvertToBytesRef(parser.objectBytes());
} else if (TO_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
to = maybeConvertToBytesRef(parser.objectBytes());
} else if (INCLUDE_LOWER_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
includeLower = parser.booleanValue();
} else if (INCLUDE_UPPER_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
includeUpper = parser.booleanValue();
} else if (AbstractQueryBuilder.BOOST_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
if (AbstractQueryBuilder.BOOST_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
boost = parser.floatValue();
} else if (GT_FIELD.match(currentFieldName, parser.getDeprecationHandler())) {
from = maybeConvertToBytesRef(parser.objectBytes());
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ tasks.named("precommit").configure {
}

tasks.named("yamlRestCompatTestTransform").configure({ task ->
task.skipTest("security/10_forbidden/Test bulk response with invalid credentials", "warning does not exist for compatibility")
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry)", "The telemetry output changed. We dropped a column. That's safe.")
task.skipTest("inference/inference_crud/Test get all", "Assertions on number of inference models break due to default configs")
task.skipTest("esql/60_usage/Basic ESQL usage output (telemetry) snapshot version", "The number of functions is constantly increasing")
Expand Down