mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[ES|QL] Add _score in the autocomplete (#212741)
## Summary Adding _score in the metadata autocomplete suggestions <img width="948" alt="image" src="https://github.com/user-attachments/assets/58174ab8-72fc-4c84-81e6-6e6fba5e0cde" />
This commit is contained in:
parent
642e8f9622
commit
6efa46a1ab
2 changed files with 13 additions and 4 deletions
|
@ -959,9 +959,10 @@ describe('autocomplete', () => {
|
|||
{ filterText: '_source', text: '_source, ', command: TRIGGER_SUGGESTION_COMMAND },
|
||||
]);
|
||||
// no comma if there are no more fields
|
||||
testSuggestions('FROM a METADATA _id, _ignored, _index, _source, _index_mode, _version/', [
|
||||
{ filterText: '_version', text: '_version | ', command: TRIGGER_SUGGESTION_COMMAND },
|
||||
]);
|
||||
testSuggestions(
|
||||
'FROM a METADATA _id, _ignored, _index, _source, _index_mode, _score, _version/',
|
||||
[{ filterText: '_version', text: '_version | ', command: TRIGGER_SUGGESTION_COMMAND }]
|
||||
);
|
||||
});
|
||||
|
||||
describe.each(['KEEP', 'DROP'])('%s <field>', (commandName) => {
|
||||
|
|
|
@ -15,7 +15,15 @@ export const SINGLE_TICK_REGEX = /`/g;
|
|||
export const DOUBLE_BACKTICK = '``';
|
||||
export const SINGLE_BACKTICK = '`';
|
||||
|
||||
export const METADATA_FIELDS = ['_version', '_id', '_index', '_source', '_ignored', '_index_mode'];
|
||||
export const METADATA_FIELDS = [
|
||||
'_version',
|
||||
'_id',
|
||||
'_index',
|
||||
'_source',
|
||||
'_ignored',
|
||||
'_index_mode',
|
||||
'_score',
|
||||
];
|
||||
|
||||
export const FULL_TEXT_SEARCH_FUNCTIONS = ['match', 'match_operator', 'qstr', 'kql'];
|
||||
export const UNSUPPORTED_COMMANDS_BEFORE_QSTR = new Set([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue