Skip to content
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

Wildcard in a text box escapes the wildcard #130

Closed
mzupan opened this issue Jun 9, 2024 · 4 comments
Closed

Wildcard in a text box escapes the wildcard #130

mzupan opened this issue Jun 9, 2024 · 4 comments

Comments

@mzupan
Copy link

mzupan commented Jun 9, 2024

Using the plugin, if I set a textbox variable and use a wildcard like

Screenshot 2024-06-09 at 9 38 10 AM

In the query it is escaping the *. Here is the query it sent to quickwit

query:"status_code:[200 TO 499] AND endpoint:\"\\*\""

This is my query for the graph

status_code:[200 TO 499] AND endpoint:"$endpoint"

Also tried

status_code:[200 TO 499] AND endpoint:$endpoint
status_code:[200 TO 499] AND endpoint:""$endpoint
@uptickmetachu
Copy link

everything is escaped when sent via query it seems.

This severely limits the use of variables as a way to drill down for search.

@fmassot
Copy link
Contributor

fmassot commented Aug 1, 2024

@mzupan @uptickmetachu I think it's possible to avoid this pb. On Fly.io we have a query text box, and this works: ${query:text}

To give you the full query run on Fly: fly.app.name:${app:singlequote} fly.app.instance:${instance:singlequote} ${query:text}

Note that in the grafana plugin, the default boolean operator is AND, so in this example, quickwit will really execute fly.app.name:${app:singlequote} AND fly.app.instance:${instance:singlequote} AND ${query:text}

@uptickmetachu
Copy link

uptickmetachu commented Aug 1, 2024

Yup works for me!

I do have to use some querybuilding trickery to make it work as a field exists * when nothing is selected and as a quoted text for when a value is selected.

@mzupan
Copy link
Author

mzupan commented Oct 14, 2024

thanks finally got around to this but ${query:text} seemed to fix the issue

@mzupan mzupan closed this as completed Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants