Add support for Fts auto Complete and docs + tests#406
Add support for Fts auto Complete and docs + tests#406prajwal-pai77 wants to merge 27 commits intoDA-392-Add-Search-Query-Validationfrom
Conversation
prajwal-pai77
commented
Jul 16, 2024
- Add support for FTS auto complete
- Add support for Documentation hover
- Add support for FTS auto complete templates
- Updated and added unit tests
1. Add KeyWords Support 2. Add Named Parameters Support 3. Add Buckets, Scope, Collections support All the above entities will now be recommended
## Describe the problem this PR is solving ## Short description of the changes -
| "key": "ctrl+shift+e", | ||
| "mac": "cmd+shift+e", | ||
| "when": "(editorLangId == cbs.json || resourceFilename =~ /.cbs.json$/) && !isKVCluster" | ||
| "when": "editorLangId == json && resourceFilename =~ /\\.cbs\\.json$/ && !isKVCluster && isSearchEnabled" |
There was a problem hiding this comment.
QQ: Do we use query to search or just the SDK?
If we directly use SDK, then probably we don't require isKVCluster check
| ## [v2.1.0] | ||
| - Add FTS workbench support inside extension | ||
| - Add FTS workbench json validation | ||
| - Add FTS workbench json auto complete feature | ||
| - Add FTS workbench documentation | ||
|
|
||
| ## [v2.0.0] |
There was a problem hiding this comment.
Please add other changelogs as well for versions 2.0.1->2.0.5
| "command": "vscode-couchbase.runSearch", | ||
| "category": "Couchbase", | ||
| "when": "(editorLangId == cbs.json || resourceFilename =~ /.cbs.json$/) && !isKVCluster", | ||
| "when": "editorLangId == json && resourceFilename =~ /\\.cbs\\.json$/ && !isKVCluster && isSearchEnabled", |
There was a problem hiding this comment.
This is because I updated the languageId to be json it self and not cbs.json, due to which we need the conditional
"editorLangId == json && resourceFilename =~ /\.cbs\.json$/ to be true, otherwise it will trigger for all json files which is not what we want.
| await workbenchWebviewProvider.sendQueryResult(JSON.stringify([{ "status": "Executing statement" }]), { queryStatus: QueryStatus.Running }, null); | ||
| const explainPlan = JSON.stringify(""); | ||
| const couchbbaseRestAPI = new CouchbaseRestAPI(connection); | ||
| const searchIndexesManager = connection?.cluster?.searchIndexes(); |
There was a problem hiding this comment.
Why no scope level indexes?
There was a problem hiding this comment.
This is better in this file, i feel because: queryContext?.indexName is of the format bucketName.scopeName.indexName and using scope level indexes returns just indexName. Also we will need to pass additional parameter scopeName and bucketName to this method which is unnecessary, as we can just check directly if the index is present in the cluster level or not.
|
Formatted using prettier, Also updated changelog to include from v2.0.1->v2.0.5 |