Skip to content

Commit 816095c

Browse files
authored
Fix expected queries in PushQueriesIT (#128608)
This commit fixes the expected query in PushQueriesIT, when the range query for foo == 1 rewrites to a MatchAllDocsQuery (*:*), when the data in the index can be proven to be within range.
1 parent a655141 commit 816095c

File tree

1 file changed

+2
-4
lines changed
  • x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node

1 file changed

+2
-4
lines changed

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/PushQueriesIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
1111
import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
1212

13-
import org.apache.lucene.tests.util.LuceneTestCase;
1413
import org.elasticsearch.client.Request;
1514
import org.elasticsearch.client.Response;
1615
import org.elasticsearch.client.ResponseException;
@@ -52,7 +51,6 @@
5251
* Tests for pushing queries to lucene.
5352
*/
5453
@ThreadLeakFilters(filters = TestClustersThreadFilter.class)
55-
@LuceneTestCase.AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/128506")
5654
public class PushQueriesIT extends ESRestTestCase {
5755
@ClassRule
5856
public static ElasticsearchCluster cluster = Clusters.testCluster(spec -> spec.plugin("inference-service-test"));
@@ -147,8 +145,8 @@ public void testEqualityAndOther() throws IOException {
147145
| WHERE test == "%value" AND foo == 1
148146
""";
149147
List<String> luceneQueryOptions = switch (type) {
150-
case "text", "auto" -> List.of("#test.keyword:%value -_ignored:test.keyword #foo:[1 TO 1]");
151-
case "match_only_text" -> List.of("foo:[1 TO 1]");
148+
case "text", "auto" -> List.of("#test.keyword:%value -_ignored:test.keyword");
149+
case "match_only_text" -> List.of("*:*");
152150
case "semantic_text" ->
153151
/*
154152
* single_value_match is here because there are extra documents hiding in the index

0 commit comments

Comments
 (0)