Simple query string syntax highlighter

Does anyone know of an existing syntax highlighter for simple query string?

More generally, I’d like to find a way to help my users avoid mistakes in their queries — missing parentheses, missing quotes for a phrase, etc. My first instinct was to write a syntax highlighter (the queries are simple query strings), but open to ideas.


There's a javascript package that can parse Lucene query_string syntax and it give you offsets of where errors occur that can be useful in highlighting.

If you can use Kibana, the KQL input format tries to help with a lot of this stuff in providing auto-complete behaviour and selections built into the input box.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.