app/vmui/logs: fix missing field values in auto-complete
Describe Your Changes
Related issue: #8749
Added query to requests /field_names and /field_values to get more precision results:
-
If
filterNameis_msgor_stream_id, the query cannot be generated specifically, so a wildcard query ("*") is returned. -
If
filterNameis_stream, the query is generated using regexp ({type=~"value.*"}). -
If
filterNameis_time, a simplified query is created by trimming the value up to the first occurrence of a delimiter such as-or:. -
For all other values of
filterName, a prefix query is returned using thequeryvalue with a*appended (e.g.,"value*").
Related issue: #8806 Enhanced autocomplete with parsed field suggestions from unpack pipe.
Checklist
The following checks are mandatory:
- [ ] My change adheres to VictoriaMetrics contributing guidelines.
If filterName is _time, a simplified query is created by trimming the value up to the first occurrence of a delimiter such as - or :
It would be nice if you could include other logical operators like :-, :!, :=. For example, you could write field:- "e", field:=word, or field:!info. Currently, the autocomplete trigger only activates with field:, so when you need to exclude something, you have to move the cursor again to add these operators.
It would be nice if you could include other logical operators like
:-,:!,:=. For example, you could writefield:- "e",field:=word, orfield:!info. Currently, the autocomplete trigger only activates withfield:, so when you need to exclude something, you have to move the cursor again to add these operators.
Thanks for comment! Added it now.
https://github.com/user-attachments/assets/2f582bc4-4d16-4ee4-81fd-6f251947b95d
Hi,
I'm just curious when this feature will be included in release. Thanks
@arturminchukov , thanks for the fix!