-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ES|QL Reranker command #123074
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
ES|QL Reranker command #123074
Changes from all commits
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
612dbcc
Reranker grammar.
afoucret b2c0e11
Adding logical plan for the rerank command.
afoucret 6818567
Rerank command logical plan parsing
afoucret fae22df
Rerank command analysis and verification.
afoucret 4302a69
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 7787efe
[CI] Auto commit changes from spotless
elasticsearchmachine 9069561
Adding physical plan and operator for Rerank
afoucret 89bdda4
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 5c19b29
Inference execution.
afoucret b7d75a7
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 025aaf9
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 68426b9
Moving RerankOperator
afoucret 6b1c04c
Make the rerank command SortAgnostic
afoucret 85325d1
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 763ccef
Remove useless exchange for reranker.
afoucret 395db68
Remove trailing debug instructions.
afoucret e5532f9
Use a LinkedHashMap to preserver order of fields passed to the operator.
afoucret d311d1b
Refactoring
afoucret ec8c6f2
Basic CSV tests for the RERANK command.
afoucret d4ab3fd
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 1e2b125
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret cd9c076
[CI] Auto commit changes from spotless
elasticsearchmachine 816993f
Fix missing import after merge.
afoucret 5d45936
Checkstyle fix.
afoucret 694902e
Add missing writeable for test reranger task settings to the TestInfe…
afoucret 8e000a1
Fix a bug in the TestRerankingServiceExtension task settings serializ…
afoucret 6322546
Better handling of block releases in the RerankOperator
afoucret e114548
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 4b88842
Fix some failing tests.
afoucret 52fc536
RerankOperator tests
afoucret 84ff359
RerankOperator tests
afoucret d86f5b2
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret d4d1d08
RERANK is not ready for CCQ yet
afoucret 1fd0b14
Fixing some tests.
afoucret b1d9f4a
[CI] Auto commit changes from spotless
elasticsearchmachine ef688f7
Testing that _score is an existing column
afoucret b0129a3
RereankOperator refactoring
afoucret 54ce1eb
Small test refactoring
afoucret ca6e972
Fix some tests.
afoucret bac4f9a
Fix an error in a copy/paste
afoucret 4ef3f7e
Add missing import.
afoucret 7e021f4
Add missing import.
afoucret 78a7efb
[CI] Auto commit changes from spotless
elasticsearchmachine 0e918df
Better handling of the YAML encoding.
afoucret 5eadd6f
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 3444c07
Renaming function in tests.
afoucret ca295fb
Renaming function in tests.
afoucret 32dbb2c
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 69d551f
Adding the _score column automatically if missing from previous step.
afoucret 01c0529
Fix typo.
afoucret cd813fd
Add missing assertion in AnalyzerTests
afoucret 84640cc
Continue refactoring of the RowEncoder.
afoucret 587d947
Update docs/changelog/123074.yaml
afoucret 83ba8fb
Rework inference resolution error.
afoucret 2ce8ab1
Rewording.
afoucret ced6e5f
Improved changelog.
afoucret 70f7ada
Improved XContentRowEncoder to support most element types correctly.
afoucret 8e67202
Fix Javadoc.
afoucret c56a15e
Fix changelog
afoucret ee00286
Delete useless interface.
afoucret cffd345
Spotless fix.
afoucret d97701b
Ensure RERANK is done on the coordinator node.
afoucret 53d1d2e
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 05e0d45
[CI] Auto commit changes from spotless
elasticsearchmachine dccaf4a
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 4cdfdfa
Regen grammar after merge.
afoucret 7ff6b27
Update docs/changelog/123074.yaml
afoucret 279291b
Using enum string representation for serioalization.
afoucret 0f10c3f
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 04c7516
[CI] Auto commit changes from spotless
elasticsearchmachine 5ab46d9
Fix bug introduced during merge.
afoucret 4e17324
Reorder the Lexer tokens.
afoucret c998b38
Fix StatementParserTests for reranking.
afoucret 62e42a5
[CI] Auto commit changes from spotless
elasticsearchmachine a151971
Improved grammar for the RERANK command.
afoucret f5c6a4f
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 3de79f1
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 4099079
Fix typo.
afoucret 1a6161b
Adding additional CSV test cases.
afoucret 983ce28
Adding more tests.
afoucret 6627bb1
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 8150a1f
[CI] Auto commit changes from spotless
elasticsearchmachine 79d5581
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret ea134a7
Muting a flaky test.
afoucret ef82268
Not using an OriginSettingsClient anymore in the InferenceService
afoucret ce38aa7
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 132825d
InferenceService refactoring (now InferenceRunner)
afoucret 9dee9a5
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret d26cc76
Rerank is not a pipeline breaker anymore.
afoucret 9e47052
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 109a3dc
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 39fe811
Merge branch 'main' into esql-reranker-boostrap
afoucret d8fe1db
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 37e1d1c
Use double in tests.
afoucret 4cad906
Use rounded scores in tests.
afoucret cf87127
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 45ebc85
Merge branch 'main' into esql-reranker-boostrap
afoucret a166961
Fix serverless build.
afoucret e084062
Use Rest to check capability instead of constant.
afoucret 63d83ec
Merge branch 'main' of https://github.com/elastic/elasticsearch into …
afoucret 65aac16
Temporary deleting IT cause they are failing on serverless.
afoucret ef0e5c1
Add missing capability in the CSV test
afoucret File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pr: 123074 | ||
summary: Adding ES|QL Reranker command in snapshot builds | ||
area: Ranking | ||
type: feature | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
// Generated from /Users/afoucret/git/elasticsearch/x-pack/plugin/esql/src/main/antlr/EsqlBaseLexer.g4 by ANTLR 4.13.2 | ||
|
||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import org.antlr.v4.runtime.Lexer; | ||
import org.antlr.v4.runtime.CharStream; | ||
import org.antlr.v4.runtime.Token; | ||
import org.antlr.v4.runtime.TokenStream; | ||
import org.antlr.v4.runtime.*; | ||
import org.antlr.v4.runtime.atn.*; | ||
import org.antlr.v4.runtime.dfa.DFA; | ||
import org.antlr.v4.runtime.misc.*; | ||
|
||
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"}) | ||
public class EsqlBaseLexer extends LexerConfig { | ||
static { RuntimeMetaData.checkVersion("4.13.2", RuntimeMetaData.VERSION); } | ||
|
||
protected static final DFA[] _decisionToDFA; | ||
protected static final PredictionContextCache _sharedContextCache = | ||
new PredictionContextCache(); | ||
public static final int | ||
LINE_COMMENT=1, MULTILINE_COMMENT=2, WS=3; | ||
public static String[] channelNames = { | ||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN" | ||
}; | ||
|
||
public static String[] modeNames = { | ||
"DEFAULT_MODE" | ||
}; | ||
|
||
private static String[] makeRuleNames() { | ||
return new String[] { | ||
"LINE_COMMENT", "MULTILINE_COMMENT", "WS" | ||
}; | ||
} | ||
public static final String[] ruleNames = makeRuleNames(); | ||
|
||
private static String[] makeLiteralNames() { | ||
return new String[] { | ||
}; | ||
} | ||
private static final String[] _LITERAL_NAMES = makeLiteralNames(); | ||
private static String[] makeSymbolicNames() { | ||
return new String[] { | ||
null, "LINE_COMMENT", "MULTILINE_COMMENT", "WS" | ||
}; | ||
} | ||
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); | ||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); | ||
|
||
/** | ||
* @deprecated Use {@link #VOCABULARY} instead. | ||
*/ | ||
@Deprecated | ||
public static final String[] tokenNames; | ||
static { | ||
tokenNames = new String[_SYMBOLIC_NAMES.length]; | ||
for (int i = 0; i < tokenNames.length; i++) { | ||
tokenNames[i] = VOCABULARY.getLiteralName(i); | ||
if (tokenNames[i] == null) { | ||
tokenNames[i] = VOCABULARY.getSymbolicName(i); | ||
} | ||
|
||
if (tokenNames[i] == null) { | ||
tokenNames[i] = "<INVALID>"; | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
@Deprecated | ||
public String[] getTokenNames() { | ||
return tokenNames; | ||
} | ||
|
||
@Override | ||
|
||
public Vocabulary getVocabulary() { | ||
return VOCABULARY; | ||
} | ||
|
||
|
||
public EsqlBaseLexer(CharStream input) { | ||
super(input); | ||
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); | ||
} | ||
|
||
@Override | ||
public String getGrammarFileName() { return "EsqlBaseLexer.g4"; } | ||
|
||
@Override | ||
public String[] getRuleNames() { return ruleNames; } | ||
|
||
@Override | ||
public String getSerializedATN() { return _serializedATN; } | ||
|
||
@Override | ||
public String[] getChannelNames() { return channelNames; } | ||
|
||
@Override | ||
public String[] getModeNames() { return modeNames; } | ||
|
||
@Override | ||
public ATN getATN() { return _ATN; } | ||
|
||
public static final String _serializedATN = | ||
"\u0004\u0000\u0003.\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+ | ||
"\u0007\u0001\u0002\u0002\u0007\u0002\u0001\u0000\u0001\u0000\u0001\u0000"+ | ||
"\u0001\u0000\u0005\u0000\f\b\u0000\n\u0000\f\u0000\u000f\t\u0000\u0001"+ | ||
"\u0000\u0003\u0000\u0012\b\u0000\u0001\u0000\u0003\u0000\u0015\b\u0000"+ | ||
"\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ | ||
"\u0001\u0001\u0005\u0001\u001e\b\u0001\n\u0001\f\u0001!\t\u0001\u0001"+ | ||
"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0004"+ | ||
"\u0002)\b\u0002\u000b\u0002\f\u0002*\u0001\u0002\u0001\u0002\u0001\u001f"+ | ||
"\u0000\u0003\u0001\u0001\u0003\u0002\u0005\u0003\u0001\u0000\u0002\u0002"+ | ||
"\u0000\n\n\r\r\u0003\u0000\t\n\r\r 3\u0000\u0001\u0001\u0000\u0000\u0000"+ | ||
"\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000"+ | ||
"\u0001\u0007\u0001\u0000\u0000\u0000\u0003\u0018\u0001\u0000\u0000\u0000"+ | ||
"\u0005(\u0001\u0000\u0000\u0000\u0007\b\u0005/\u0000\u0000\b\t\u0005/"+ | ||
"\u0000\u0000\t\r\u0001\u0000\u0000\u0000\n\f\b\u0000\u0000\u0000\u000b"+ | ||
"\n\u0001\u0000\u0000\u0000\f\u000f\u0001\u0000\u0000\u0000\r\u000b\u0001"+ | ||
"\u0000\u0000\u0000\r\u000e\u0001\u0000\u0000\u0000\u000e\u0011\u0001\u0000"+ | ||
"\u0000\u0000\u000f\r\u0001\u0000\u0000\u0000\u0010\u0012\u0005\r\u0000"+ | ||
"\u0000\u0011\u0010\u0001\u0000\u0000\u0000\u0011\u0012\u0001\u0000\u0000"+ | ||
"\u0000\u0012\u0014\u0001\u0000\u0000\u0000\u0013\u0015\u0005\n\u0000\u0000"+ | ||
"\u0014\u0013\u0001\u0000\u0000\u0000\u0014\u0015\u0001\u0000\u0000\u0000"+ | ||
"\u0015\u0016\u0001\u0000\u0000\u0000\u0016\u0017\u0006\u0000\u0000\u0000"+ | ||
"\u0017\u0002\u0001\u0000\u0000\u0000\u0018\u0019\u0005/\u0000\u0000\u0019"+ | ||
"\u001a\u0005*\u0000\u0000\u001a\u001f\u0001\u0000\u0000\u0000\u001b\u001e"+ | ||
"\u0003\u0003\u0001\u0000\u001c\u001e\t\u0000\u0000\u0000\u001d\u001b\u0001"+ | ||
"\u0000\u0000\u0000\u001d\u001c\u0001\u0000\u0000\u0000\u001e!\u0001\u0000"+ | ||
"\u0000\u0000\u001f \u0001\u0000\u0000\u0000\u001f\u001d\u0001\u0000\u0000"+ | ||
"\u0000 \"\u0001\u0000\u0000\u0000!\u001f\u0001\u0000\u0000\u0000\"#\u0005"+ | ||
"*\u0000\u0000#$\u0005/\u0000\u0000$%\u0001\u0000\u0000\u0000%&\u0006\u0001"+ | ||
"\u0000\u0000&\u0004\u0001\u0000\u0000\u0000\')\u0007\u0001\u0000\u0000"+ | ||
"(\'\u0001\u0000\u0000\u0000)*\u0001\u0000\u0000\u0000*(\u0001\u0000\u0000"+ | ||
"\u0000*+\u0001\u0000\u0000\u0000+,\u0001\u0000\u0000\u0000,-\u0006\u0002"+ | ||
"\u0000\u0000-\u0006\u0001\u0000\u0000\u0000\u0007\u0000\r\u0011\u0014"+ | ||
"\u001d\u001f*\u0001\u0000\u0001\u0000"; | ||
public static final ATN _ATN = | ||
new ATNDeserializer().deserialize(_serializedATN.toCharArray()); | ||
static { | ||
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; | ||
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { | ||
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); | ||
} | ||
} | ||
} |
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,3 @@ | ||
LINE_COMMENT=1 | ||
MULTILINE_COMMENT=2 | ||
WS=3 |
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ CSS support is tracked as a follow-up in the meta issue (#124337)