-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add autocomplete suggestions for dense_vector type #190769
Add autocomplete suggestions for dense_vector type #190769
Conversation
__one_of: [ | ||
'', | ||
// text-based types | ||
{ __one_of: ['positions', 'docs', 'freqs', 'offsets'] }, |
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.
positions
is default in 8.x - adjusted according to https://www.elastic.co/guide/en/elasticsearch/reference/8.15/index-options.html
__one_of: [ | ||
'', | ||
// text-based types | ||
{ __one_of: ['BM25', 'boolean'] }, |
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.
BM25
is default in 8.x - adjusted according to https://www.elastic.co/guide/en/elasticsearch/reference/8.15/similarity.html
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.
Same here, I think all options can be added in one array, they are displayed all together anyways
@@ -84,7 +85,20 @@ export const mappings = (specService: SpecDefinitionsService) => { | |||
// index_prefixes: { min_chars, max_chars }, | |||
|
|||
index_options: { | |||
__one_of: ['docs', 'freqs', 'positions'], | |||
__one_of: [ |
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.
I think the autocomplete could work with the object just added among the string options, wdyt?
__one_of: [
'positions',
'docs',
'freqs',
'offsets',
{
type:
...
}
]
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.
Thanks for this point. Yes, that's better, so I flattened the unnecessary nests of __one_of
.
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.
Thanks a lot for adding these definitions, @sakurai-youhei! I think it looks great, we could just simplify the changes in some places. Let me know what you think
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.
Thanks! LGTM.
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
To update your PR or re-run it, just comment with: |
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.
Thanks a lot, @sakurai-youhei! Latest changes LGTM 👍
This PR adds autocomplete for `dense_vector` type. Closes elastic#190763 --------- Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 9cfd409)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…193570) # Backport This will backport the following commits from `main` to `8.x`: - [Add autocomplete suggestions for dense_vector type (#190769)](#190769) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Youhei Sakurai","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-20T13:04:30Z","message":"Add autocomplete suggestions for dense_vector type (#190769)\n\nThis PR adds autocomplete for `dense_vector` type.\r\n\r\nCloses https://github.com/elastic/kibana/issues/190763\r\n\r\n---------\r\n\r\nCo-authored-by: Quentin Pradet <[email protected]>","sha":"9cfd40937522276d0d78c5aae2bd5142623d8c91","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:Console","Feature:Dev Tools","enhancement","v9.0.0","backport:prev-minor","v8.16.0"],"title":"Add autocomplete suggestions for dense_vector type","number":190769,"url":"https://github.com/elastic/kibana/pull/190769","mergeCommit":{"message":"Add autocomplete suggestions for dense_vector type (#190769)\n\nThis PR adds autocomplete for `dense_vector` type.\r\n\r\nCloses https://github.com/elastic/kibana/issues/190763\r\n\r\n---------\r\n\r\nCo-authored-by: Quentin Pradet <[email protected]>","sha":"9cfd40937522276d0d78c5aae2bd5142623d8c91"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190769","number":190769,"mergeCommit":{"message":"Add autocomplete suggestions for dense_vector type (#190769)\n\nThis PR adds autocomplete for `dense_vector` type.\r\n\r\nCloses https://github.com/elastic/kibana/issues/190763\r\n\r\n---------\r\n\r\nCo-authored-by: Quentin Pradet <[email protected]>","sha":"9cfd40937522276d0d78c5aae2bd5142623d8c91"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Youhei Sakurai <[email protected]>
Summary
This PR adds autocomplete for
dense_vector
type.With
console.dev.enableMonaco: false
:With
console.dev.enableMonaco: true
:Closes #190763
For maintainers
Release note
Improves autocomplete to suggest fields for
dense_vector
type