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
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ protected void shouldSkipTest(String testName) throws IOException {
super.shouldSkipTest(testName);

assumeFalse(
"Tests using FORK or RRF already are skipped since we don't support multiple FORKs",
testCase.requiredCapabilities.contains(FORK_V9.capabilityName()) || testCase.requiredCapabilities.contains(RRF.capabilityName())
"Tests using FORK are skipped since we don't support multiple FORKs",
testCase.requiredCapabilities.contains(FORK_V9.capabilityName())
);

assumeFalse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,16 @@ book_no:keyword | title:text | author
;


reranker after RRF
reranker after FUSE
required_capability: fork_v9
required_capability: rrf
required_capability: fuse
required_capability: match_operator_colon
required_capability: rerank

FROM books METADATA _id, _index, _score
| FORK ( WHERE title:"Tolkien" | SORT _score, _id DESC | LIMIT 3 )
( WHERE author:"Tolkien" | SORT _score, _id DESC | LIMIT 3 )
| RRF
| FUSE
| RERANK "Tolkien" ON title WITH inferenceId=test_reranker
| EVAL _score=ROUND(_score, 2)
| SORT _score DESC, book_no ASC
Expand Down
132 changes: 0 additions & 132 deletions x-pack/plugin/esql/qa/testFixtures/src/main/resources/rrf.csv-spec

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,27 @@
import static org.elasticsearch.xpack.esql.EsqlTestUtils.getValuesList;
import static org.hamcrest.Matchers.equalTo;

public class RrfIT extends AbstractEsqlIntegTestCase {
public class FuseIT extends AbstractEsqlIntegTestCase {
@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
return List.of(EsqlPluginWithEnterpriseOrTrialLicense.class);
}

@Before
public void setupIndex() {
assumeTrue("requires RRF capability", EsqlCapabilities.Cap.RRF.isEnabled());
assumeTrue("requires FUSE capability", EsqlCapabilities.Cap.FUSE.isEnabled());
createAndPopulateIndex();
}

public void testRrf() {
public void testFuseWithRrf() throws Exception {
var query = """
FROM test METADATA _score, _id, _index
| WHERE id > 2
| FORK
( WHERE content:"fox" | SORT _score, _id DESC )
( WHERE content:"dog" | SORT _score, _id DESC )
| RRF
| FUSE
| SORT _score DESC, _id, _index
| EVAL _fork = mv_sort(_fork)
| EVAL _score = round(_score, 4)
| KEEP id, content, _score, _fork
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
import static org.hamcrest.Matchers.containsString;

public class RrfWithInvalidLicenseIT extends AbstractEsqlIntegTestCase {
private static final String LICENSE_ERROR_MESSAGE = "current license is non-compliant for [RRF]";
public class FuseWithInvalidLicenseIT extends AbstractEsqlIntegTestCase {
private static final String LICENSE_ERROR_MESSAGE = "current license is non-compliant for [FUSE]";

@Override
protected Collection<Class<? extends Plugin>> nodePlugins() {
Expand All @@ -31,7 +31,7 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {

@Before
public void setupIndex() {
assumeTrue("requires RRF capability", EsqlCapabilities.Cap.RRF.isEnabled());
assumeTrue("requires FUSE capability", EsqlCapabilities.Cap.FUSE.isEnabled());
var indexName = "test";
var client = client().admin().indices();
var CreateRequest = client.prepareCreate(indexName)
Expand All @@ -52,7 +52,7 @@ public void testRrf() {
| FORK
( WHERE content:"fox" )
( WHERE content:"dog" )
| RRF
| FUSE
""";

ElasticsearchException e = expectThrows(VerificationException.class, () -> run(query));
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ import ChangePoint,
Lookup,
MvExpand,
Project,
Rrf,
Rename,
Show,
UnknownCommand;
Expand Down
Loading