lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Additive filters to narrow down results

Open trantor opened this issue 1 year ago • 2 comments

From what I can gather playing with the filtering system the filters in any given directions are evaluated to provide a UNION of the results of the single filters. It could be very useful to provide filters (maybe "children" filters of existing filters?) which would evaluate by INTERSECTING their result sets, in essence filters that would be chained in order to narrow down results further.

For instance, one may create a general filter that narrows down log line to those matching a specific pattern, then it might be useful to explore through adding/removing additional filters which would narrow the result set of the previous filter filtering by username or e-mail address, without bringing in lines that do not match the first filter at all but have the username/e-mail fragment in them. Narrowing down matches by progressively restricting the match is a common pattern, one which might be done by chaining multiple grep instances in a pipeline, for example.

As far I understand, this common pattern is not achievable easily through the filters in lnav

trantor avatar Sep 08 '22 23:09 trantor

See #790 and #707.

tstack avatar Sep 09 '22 15:09 tstack

Thanks @tstack for the references. I would like to make some suggestions on the topic once I've read through them with due care.

trantor avatar Sep 11 '22 17:09 trantor