chengpohi / edql Goto Github PK
View Code? Open in Web Editor NEWElasticsearch Query GUI Client
Home Page: https://plugins.jetbrains.com/plugin/16364-elasticsearch-query--edql
License: Apache License 2.0
Elasticsearch Query GUI Client
Home Page: https://plugins.jetbrains.com/plugin/16364-elasticsearch-query--edql
License: Apache License 2.0
I have value "type_id": "302.0",
for
"type_id": {
"type": "keyword"
},
@Field(name = "type_id", type = Keyword)
private String typeId;
but view only "302"
Open EDQLs error
IDEA:2023.1
Pluguin:1.9.19
java.lang.NoSuchMethodError: 'com.intellij.openapi.fileEditor.impl.text.TextEditorComponent com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl.getComponent()'
at com.github.chengpohi.edql.editor.EDQLPsiAwareTextEditor.createComponent(EDQLPsiAwareTextEditor.java:89)
at com.github.chengpohi.edql.editor.EDQLPsiAwareTextEditor.(EDQLPsiAwareTextEditor.java:54)
at com.github.chengpohi.edql.editor.EDQLTextFileEditorProvider.createEditor(EDQLTextFileEditorProvider.java:28)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.createComposite(FileEditorManagerImpl.kt:1139)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.doOpenInEdtImpl(FileEditorManagerImpl.kt:1048)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.doOpenInEdtImpl$default(FileEditorManagerImpl.kt:1035)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$openFileImpl4$open$1.invoke(FileEditorManagerImpl.kt:1010)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$openFileImpl4$open$1.invoke(FileEditorManagerImpl.kt:996)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl$Companion.runBulkTabChange$intellij_platform_ide_impl(FileEditorManagerImpl.kt:390)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4$open(FileEditorManagerImpl.kt:996)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl4$intellij_platform_ide_impl(FileEditorManagerImpl.kt:1024)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2$lambda$22(FileEditorManagerImpl.kt:900)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileImpl2(FileEditorManagerImpl.kt:899)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFile(FileEditorManagerImpl.kt:798)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openEditorImpl$lambda$31(FileEditorManagerImpl.kt:1275)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openEditorImpl(FileEditorManagerImpl.kt:1268)
at com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl.openFileEditor(FileEditorManagerImpl.kt:1245)
at com.intellij.openapi.fileEditor.FileEditorManager.openEditor(FileEditorManager.java:239)
at com.intellij.openapi.fileEditor.FileNavigatorImpl.navigateInAnyFileEditor(FileNavigatorImpl.java:110)
at com.intellij.openapi.fileEditor.FileNavigatorImpl.navigateInEditor(FileNavigatorImpl.java:86)
at com.intellij.openapi.fileEditor.FileNavigatorImpl.navigateInEditorOrNativeApp(FileNavigatorImpl.java:71)
at com.intellij.openapi.fileEditor.FileNavigatorImpl.navigate(FileNavigatorImpl.java:49)
at com.intellij.openapi.fileEditor.OpenFileDescriptor.navigate(OpenFileDescriptor.java:89)
at com.github.chengpohi.dock.EDQLDockComponent$13.lambda$actionPerformed$0(EDQLDockComponent.java:299)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:209)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:21)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:191)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.openapi.application.impl.ApplicationImpl$3.run(ApplicationImpl.java:456)
at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:79)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:122)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:41)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:666)
at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$7(IdeEventQueue.kt:570)
at com.intellij.openapi.application.impl.ApplicationImpl.withoutImplicitRead(ApplicationImpl.java:1446)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:570)
at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:68)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:348)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:348)
at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:343)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:994)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:994)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$4(IdeEventQueue.kt:343)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:831)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:385)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
When trying to connect to a URL similar to: https://ourserver.company.com/stage1-kibana the test connection returns Connect failed: 404 page not found.
I noticed, that in the list of connections it appears with :-1 appended.
Server: AWS Opensearch
Plugin stacktrace:
java.lang.IllegalStateException: Not a JSON Object: "Incorrect HTTP method for uri [/_cat/transforms?format=json] and method [GET], allowed: [POST]"
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at java.base/java.util.Optional.map(Optional.java:260)
at com.github.chengpohi.util.ExecuteResult.isFail(ExecuteResult.java:49)
at com.github.chengpohi.util.ExecuteResult.extract(ExecuteResult.java:97)
at com.github.chengpohi.api.RunApi.run(RunApi.java:49)
at com.github.chengpohi.ui.tree.node.EDQLTransformsNode.getChildren(EDQLTransformsNode.java:37)
at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:38)
at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:412)
at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:330)
at com.intellij.ui.tree.StructureTreeModel$Node.isModelLeaf(StructureTreeModel.java:585)
at com.intellij.ui.tree.StructureTreeModel.isLeaf(StructureTreeModel.java:366)
at com.intellij.ui.tree.LeafState.get(LeafState.java:64)
at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.load(AsyncTreeModel.java:577)
at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:550)
at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:443)
at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:409)
at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:305)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1086)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:71)
at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:109)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:68)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:190)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:591)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:666)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:622)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:590)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:177)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:68)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:106)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:71)
at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:187)
at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:165)
at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:475)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
In Kibana, it's possible to use following queries (note the commas)
GET _cat/indices/*force*,*vehicle*,*duty*,*person*,*provider*?h=idx
POST force*,vehicle*/_search
{
"query": {
"bool": {
"must": [
{
"terms": {
"id": [
"6afa60a0-3cf9-47b9-bf32-730b35d37b9a"
],
"boost": 1.0
}
}
]
}
}
}
Would it be possible to use same syntax in this plugin?
Thanks
When trying to connect I get the following error in an HTML document as an error message: This Elastic installation has strict security requirements enabled that your current browser does not meet.
I'm not exactly sure which setting does this, what might be relevant, is that we have xpac.security.enabled=true
and xpac.security.http.ssl.enabled=true
.
Hi chengpohi,
There is one issue I encountered while using this plugin. It does not recognised must, must_not, should clause for autocompletion. IDE give error until structure is completed.
Boolean query reference
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
Connecting to AWS OpenSearch Domains using AWS v4 Signature works as expected using the default profile.
But there is not option to choose/enter a different profile.
My OpenSSH configuration contains some entries to use a ProxyCommand, like this:
Host *.tt
ProxyCommand ~/.okta/ttsft %h
Match exec "/usr/local/bin/sft resolve -q %h"
ProxyCommand "/usr/local/bin/sft" proxycommand %h
These entries exist in a ~/.ssh/config_special
file which is included from the main ~/.ssh/config
file:
Match all
Include ~/.ssh/config_special
This works great with other IntelliJ SSH features. For example, if I go to Settings --> Tools --> SSH Configurations, and pick a Host of ".tt" and Authentication type of "OpenSSH config and authentication agent". I also set "Configuration files parser" to "OpenSSH" in the Advanced Settings of IntelliJ as well. Then, the connection works great. Other plugins are able to reuse this SSH connection with great success.
Unfortunately, EDQL does not seem to reuse this common IntelliJ SSH functionality, and whatever functionality it does have, it does not support ProxyCommand and/or Include and/or the matching (Host/Match exec) functionality. Thus, I am getting this error when I try to test the connection:
Notice the "UnknownHostException" indicating that it failed to recognize the "Host *.tt" direction, or possibly the associated ProxyCommand.
Some ideas and requests:
I am suspicious that if the right code is reused from IntelliJ, then the problem will solve itself since other plugins do not have this issue. But option # 3 could be an alternative to investigate.
java.lang.NullPointerException: Cannot read the array length because "array" is null
at java.base/java.util.Arrays.stream(Arrays.java:5428)
at com.github.chengpohi.api.AliasAPI.lambda$static$2(AliasAPI.java:19)
at com.github.chengpohi.util.ExecuteResult.extract(ExecuteResult.java:100)
at com.github.chengpohi.api.RunApi.run(RunApi.java:43)
at com.github.chengpohi.ui.tree.node.EDQLAliasesNode.getChildren(EDQLAliasesNode.java:37)
at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:37)
at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:383)
at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:299)
at com.intellij.ui.tree.StructureTreeModel$Node.isModelLeaf(StructureTreeModel.java:557)
at com.intellij.ui.tree.StructureTreeModel.isLeaf(StructureTreeModel.java:335)
at com.intellij.ui.tree.LeafState.get(LeafState.java:64)
at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.load(AsyncTreeModel.java:574)
at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:547)
at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:440)
at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:406)
at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:314)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1154)
Associated with #3
AWS also provide a way where session credentials are saved in ~/.aws/credentials . Configuration can also be specified in ~/.aws/config . There is way to distinguish between different profiles using name, default being 'default' . It would be great if plugin can automatically read the credentials, given profile name.
ref: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
it would be interesting if, in addition to the possible connections such as aws, it was possible to open an ssh connection with some remote server that contains an elasticsearch service. Sorry for bad English
Hi Chengpohi,
First, great plugin. I'm using it and come across an issue where I need to access ES using credentials provided by stsAssume.
It has three parts
aws_access_key_id
aws_secret_access_key
aws_session_token
First two can be entered by
ApiKeyId
ApiKeySecret
but there is no way for entering session token.
As per AWS documentation, it can either be entered as a header 'X-Amz-Security-Token' or part of query string not both. https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html
It would be great if this support can be added.
java.util.NoSuchElementException: Collection is empty.
at kotlin.collections.CollectionsKt___CollectionsKt.first(_Collections.kt:201)
at com.github.chengpohi.action.function.EDQLFunctionDTO$Companion.buildSystemFunction(EDQLFunctionDTO.kt:42)
at com.github.chengpohi.action.function.EDQLFunctionsNode.parseElib(EDQLFunctionsNode.kt:44)
at com.github.chengpohi.action.function.EDQLFunctionsNode.getChildren(EDQLFunctionsNode.kt:26)
at com.github.chengpohi.action.function.EDQLFunctionsNode.getChildren(EDQLFunctionsNode.kt:14)
at com.intellij.ide.util.treeView.AbstractTreeStructureBase.getChildElements(AbstractTreeStructureBase.java:38)
at com.intellij.ui.tree.StructureTreeModel.getValidChildren(StructureTreeModel.java:411)
at com.intellij.ui.tree.StructureTreeModel.validateChildren(StructureTreeModel.java:329)
at com.intellij.ui.tree.StructureTreeModel$Node.isModelLeaf(StructureTreeModel.java:584)
at com.intellij.ui.tree.StructureTreeModel.isLeaf(StructureTreeModel.java:365)
at com.intellij.ui.tree.LeafState.get(LeafState.java:62)
at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.load(AsyncTreeModel.java:597)
at com.intellij.ui.tree.AsyncTreeModel$CmdGetChildren.getNode(AsyncTreeModel.java:570)
at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:464)
at com.intellij.ui.tree.AsyncTreeModel$Command.get(AsyncTreeModel.java:430)
at com.intellij.util.concurrency.Invoker$Task.run(Invoker.java:306)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
at com.intellij.util.concurrency.Invoker.invokeSafely(Invoker.java:188)
at com.intellij.util.concurrency.Invoker.lambda$offerSafely$0(Invoker.java:165)
at com.intellij.util.concurrency.Invoker$Background.lambda$offer$0(Invoker.java:433)
at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
when I try to add a host I get this:
Connect failed: Cannot invoke "com.github.chengpohi.runner.EDQLRunnerService.run(String, com.github.chengpohi.script.EDQLRunContext)" because the return value of "com.github.chengpohi.runner.EDQLRunnerService.getInstance()" is null
Elasticseaerch is complex to operate.
After running simple query to get basic information about index: GET name_of_the_index
I receive error message about failed execution instead of the response:
java.lang.IllegalStateException: Not a JSON Object: "_all"
at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:91)
at com.github.chengpohi.util.JsonUtil.mapProps(JsonUtil.java:48)
full message: log.txt
The response to that query from other tool:
response.json.txt
I don't know how to debug this plugin, but my suspicion is that extraordinary Opensearch response "copy_to": [ "_all" ]
for almost each property.
Is it because plugin doesn't support this copy_to
(array of strings) format in properties configuration?
How to use an HTTP proxy to connect to ES
com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonArray but was com.google.gson.JsonObject; at path $
at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1010)
at com.github.chengpohi.util.JsonUtil.parseJsonArr(JsonUtil.java:399)
at com.github.chengpohi.api.TransformAPI.lambda$static$1(TransformAPI.java:27)
at com.github.chengpohi.util.ExecuteResult.extract(ExecuteResult.java:129)
at com.github.chengpohi.api.RunApi.run(RunApi.java:49)
at com.github.chengpohi.ui.tree.node.EDQLTransformsNode$1.run(EDQLTransformsNode.java:46)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
EDQL Visual Editor not support Username and Password ?
There is no option to disable cert validation.
Specially in test/dev environments it can be a problem.
For example I fail to connect to the test instance :
Connect failed: Host name '192.168.250.2' does not match the certificate subject provided by the peer (CN=elasticsearch)
{
"error": {
"root_cause": [
{
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
}
],
"type": "action_request_validation_exception",
"reason": "Validation Failed: 1: mapping type is missing;"
},
"status": 400
}
In idea.log, I found:
2022-06-06 22:18:13,323 [12312313] WARN - o.e.c.RestClient - request [PUT http://xxx:12313/aaa/_mapping] returned 1 warnings: [299 Elasticsearch-6.8.6-3d9f765 "[types removal] Specifying types in put mapping requests is deprecated. To be compatible with 7.0, the mapping definition should not be nested under the type name, and the parameter include_type_name must be provided and set to false."]
Hi @chengpohi,
First of all, I have to say great work. I really like your plugin.
I have one issue with multi-line scripts. For maintaining long scripts is deemed necessary to use multi-line scripts for easier visualization. It would great to support multi-line scripts in the plugin. E.g following script is not supported, but works perfectly in Kibana.
POST _scripts/clean-old-profiles
{
"script": {
"lang": "painless",
"source": """
void iterateAllFields(def x) {
if (x instanceof List) {
for (def v: x) {
iterateAllFields(v);
}
}
if (!(x instanceof Map)) {
return;
}
x.entrySet().removeIf(e -> (e.getValue() == "" || e.getValue() == null || ((e.getValue() instanceof List || e.getValue() instanceof Map) && e.getValue().isEmpty())));
for (def v: x.values()) {
iterateAllFields(v);
}
}
ctx.following = null;
ctx.ims = null;
ctx.products = null;
iterateAllFields(ctx);
if (ctx.languages != null) {
for(item in ctx.languages) {
item.remove('isProfileLanguage');
}
}
if (ctx.emails != null) {
for(item in ctx.emails) {
item.remove('probability');
}
}
"""
}
}
I have multiple connections as such:
PROD
QA
LOCAL
The local and qa one use localhost:9291
for host and a user/pass combo.
What QA does different is that it has ssh connection with key pair. (To an external server)
HOWEVER: The QA connection seems to actually be a similar LOCAL connection
NOTE:
PROD server is similar to QA (different key/pair and SSH Host though) BUT it has a different host: app-etc.ninja:9291
com.intellij.serviceContainer.AlreadyDisposedException: Cannot create com.intellij.psi.PsiDocumentManager because container is already disposed (container=Project(name=fcbox-uic-server, containerState=DISPOSE_COMPLETED, componentStore=/Users/jnje/IdeaProjects/ss/aaa) (disposed))
at com.intellij.serviceContainer.ContainerUtilKt.throwAlreadyDisposedError(containerUtil.kt:34)
at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:617)
at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:569)
at com.intellij.openapi.client.ClientAwareComponentManager.getFromSelfOrCurrentSession(ClientAwareComponentManager.kt:37)
at com.intellij.openapi.client.ClientAwareComponentManager.getService(ClientAwareComponentManager.kt:22)
at com.intellij.psi.PsiDocumentManager.getInstance(PsiDocumentManager.java:36)
at com.intellij.openapi.editor.impl.SoftWrapModelImpl.shouldSoftWrapsBeForced(SoftWrapModelImpl.java:164)
at com.intellij.openapi.editor.impl.SoftWrapModelImpl.documentChanged(SoftWrapModelImpl.java:468)
at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:917)
at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:821)
at com.intellij.openapi.editor.impl.DocumentImpl.insertString(DocumentImpl.java:553)
at com.github.chengpohi.edql.formatter.EDQLQuoteHandler.insertClosingQuote(EDQLQuoteHandler.java:36)
at com.intellij.codeInsight.editorActions.TypedHandler.handleQuote(TypedHandler.java:522)
at com.intellij.codeInsight.editorActions.TypedHandler.lambda$doExecute$2(TypedHandler.java:207)
at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:312)
at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:421)
at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:321)
at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:296)
at com.intellij.codeInsight.editorActions.TypedHandler.doExecute(TypedHandler.java:163)
at com.intellij.codeInsight.editorActions.TypedHandler.lambda$execute$0(TypedHandler.java:145)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:147)
at com.intellij.codeInsight.editorActions.TypedHandler.execute(TypedHandler.java:145)
at com.intellij.codeInsight.lookup.impl.LookupTypedHandler.execute(LookupTypedHandler.java:73)
at com.intellij.codeInsight.template.emmet.EmmetPreviewTypedHandler.execute(EmmetPreviewTypedHandler.java:39)
at com.intellij.execution.impl.ConsoleViewImpl$MyTypedHandler.execute(ConsoleViewImpl.java:1134)
at com.intellij.openapi.editor.impl.DefaultRawTypedHandler$1.run(DefaultRawTypedHandler.java:55)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:947)
at com.intellij.openapi.editor.impl.DefaultRawTypedHandler.execute(DefaultRawTypedHandler.java:49)
at com.intellij.openapi.editor.impl.EditorFactoryImpl$MyRawTypedHandler.execute(EditorFactoryImpl.java:298)
at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$2(TypedAction.java:200)
at com.intellij.reporting.FreezeLoggerImpl.runUnderPerformanceMonitor(FreezeLoggerImpl.java:28)
at com.intellij.openapi.editor.actionSystem.TypedAction.lambda$actionPerformed$3(TypedAction.java:199)
at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:147)
at com.intellij.openapi.editor.actionSystem.TypedAction.actionPerformed(TypedAction.java:199)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTypedNormally(EditorImpl.java:1306)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:1288)
at com.intellij.openapi.editor.impl.EditorImpl.processKeyTyped(EditorImpl.java:3435)
at com.intellij.openapi.editor.impl.EditorImpl$7.keyTyped(EditorImpl.java:1133)
at java.desktop/java.awt.Component.processKeyEvent(Component.java:6609)
at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2852)
at java.desktop/java.awt.Component.processEvent(Component.java:6431)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5029)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1962)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:881)
at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1164)
at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1020)
at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:844)
at com.intellij.ide.IdeKeyboardFocusManager.dispatchEvent(IdeKeyboardFocusManager.java:42)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4910)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2790)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4861)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:891)
at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:807)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:754)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:447)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:818)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:446)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:805)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:498)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
edql版本:
1.9.7
idea版本:
内部版本号 #IU-213.7172.25,2022年3月16日 构建
Licensed to xxx
您有此版本的永久回退许可证。
订阅有效期至 April 12, 2023。
运行时版本: 11.0.14.1+1-b1751.46 aarch64
VM: OpenJDK 64-Bit Server VM,JetBrains s.r.o.
automatically recognize the value format. If the value is in JSON format, it will be displayed using a JSON viewer and editor, providing a convenient way to interact with JSON data
Is it possible to make chatgpt query works without my API key. I would like to pay for plugin like 1-2$ per month and use chatgpt query without my API key because I don't have it. You can do some monthly quotas to restrict usage. And you can make plugin as freemium to leave all features free except chat gpt query.
In other Intellij plugins (db, redis, ...) it's possible to execute the query by cmd + enter
. Now it's little bit confusing to use shortcut ctrl + shit + R
. Would it be possible to either align with Intellij shortcut or provide an option to use custom shortcut?
Thanks
If the index names is starting with a number, like 0_my_index
, the following error prevents request execution:
<identifier 0> expected, got '0'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.