Should vistypes be able to implement custom query logic? #6345
Labels
Feature:Plugins
Feature:Visualizations
Generic visualization features (in case no more specific feature label is available)
release_note:enhancement
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
While attempting to implement a sample visualization for elastic/elasticsearch#16817 I found the desire to implement a query within the vistype. This would allow simply adding a custom visualization to the system and getting both support for the new correlation metric and a visualization that best represented it's output. Unfortunately doing so has proven difficult.
The approach I ended up taking was:
savedVis.searchSource
to thevis.params
.$scope.addGenericFetcher()
function, which registers a simple function with the courier that will be called everytime the courier wants to fetch "searches" (the pr is still pending).filterContext
,vis.params.index
andvis.params.filters
to create a query that I could then send to elasticsearch with the elasticsearch client. Unfortunately this meant writing more elasticsearch queries directly in the front-end rather than a parameterized rest endpoint, but what is a girl to do?Hopefully we can come up with a better way to accomplish this... or decide that we don't want vistypes to try and mix the current context with their custom querying... Thoughts?
The text was updated successfully, but these errors were encountered: