-
Notifications
You must be signed in to change notification settings - Fork 229
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
Filter Manager #39
Comments
Some users here asked for a button to clear all current filters, which I guess is related to the feature you proposed, although much simpler. |
Yes. I think keeping last filter is also useful, usually users don't want to list all case items in table, but see results of last filter applied. |
A pin filter feature should help a lot too now with "clear all filters" button. |
What would be the requirements for this?
|
I have some thoughts about item 2 to discuss: One could say that when you create a bookmark with the filtered items, the filter doesn't need to be persisted any more. a) But saving the filters can help in understanding how that selection was made, beyond being useful to apply the same filter in other similar cases. We can break down 2.a) and 2.b) in other 2 enhancement issues, and let them to latter roadmap than 4.2. |
Hi @patrickdalla sorry for the delay here, I was busy with other things and I have a meeting soon...
Yes that is the idea. To avoid memory usage issues, we should use BitSets. For Multicases, we could use a Map<caseID, BitSet> to save the filters for each case, since the item IDs will be repeated. ItemID class uses a lot of memory and I think should be avoided.
So I think we could start with just filter results management. Allow the user to apply set operations on the tracked BitSets results (union, intersection, subtraction) at first. Then we may improve to track the Filter definition rule later, what do you think? |
A non trivial point is: when user reapply the Filter results using the Manager, should it be reflected in the original panel used to create the Filter? Maybe that would need the Filter definition rule... Or maybe not, Filter Manager saved "filters" could be seen as another different filter (that remember last filters results) and could be combined with current Filters applied in other panels... Or should the UI workflow be totally refactored so applied Filters are shown just in the filter Manager and current UI filtering components stop being painted as RED to warn a filter is being applied? Any more possible UI interaction approaches? |
I think that restored filters should be reflected on the original panel. |
There are mainly 2 kinds of Filterers: one that provides a query to be added to the final query, and other kind the filters the resultset after it is returned by the lucene search. |
As an initial stub: Would it be anything much different than this? filtermanagerui-2023-03-06_14.06.53.mp4 |
I think they ideally could be transparent to the user, but shouldn't cause any warm if the difference is noticed.
Very cool! A feature that, in my opinion, would be very useful is allowing the user to specify the boolean operator to combine current filters. Today AND is always used, but user may want to use OR, or maybe do some custom combination of existing filters results. |
@lfcnassif , all of the filter panels does no expose the resulting bitset for now, right? So we need implement to make them expose these bitsets. Or am I missing something? Althought for AND (intersection) filtering bitsets weren't needed, they seems to be important for OR (union). |
Yes, I think some of them are not exposing the results, those Query based are not for sure. Actually we don't use BitSets yet to store filter results, we use arrays of ItemId, but I think we should switch to BitSets (or SparseBitSets) to avoid excessive memory usage. Because ids can repeat in multicases, possible we would need a Map<CaseId, BitSet> to store results, this would need some refactorings... As I understood from above video, we could save different filter results coming from the same Filterer panel, very nice! This was a feature I thought a long ago, but forgot to say, so we are having similar ideas :-) Some open questions to all devs: should each filter result be automatically saved? Or should we limit to last X filters to avoid memory issues? Or perhaps do not save automatically and expose some "Save Filter" button? |
Let me know if I'm in the right way: Would it be the right sequence of filtering?
Is it? |
Makes sense. But I think it would change behavior at least of Metadata filter tab, since its results/filters today take into account just the result set currently being displayed, after all other filters were applied, not all case data (MatchAllDocsQuery). I have discussed this before with @tc-wleite in another issue, I think we didn't come up to a conclusion. I'll arrive at work after lunch and I can search for the discussion... |
Maybe, to avoid methods to "register" the filter, it could be somewhat diferent:
|
Related issue: #1184 But with this feature, it won't be needed.
I didn't find it, maybe it was a private conversation. The idea was to change Metadata Filter behavior so it would always behave globally, on all case items, not just on current result set after applying other filters. Aggregating filters BitSets using AND would give the same result on main table. But the values for the selected property and counts in Metadata filter panel would change if we change its behavior, I'm not sure what behavior is better, maybe both have pros/cons. |
In the filterer interface, I defined a method to return a global filter,
following its internal logic, and a getDefinedFilters, that would return
internal defined IFilter objects separately. For example, each selected
bookmark would be a separated filter returned by bookmarkfilterer.
In this second method the filterer should return the filters in an
independent way, so this filter could be placed in other container and
removed from the original filter.
So I created a container, that implements a filterer itself, that receives
these filter objects from other filterers positioned in the desired defined
tree logic rule (And , Or) Once they are 'copied' to this container, their
original can be removed from the source filterer, but would still be
available to this filterer.
So, for metadata panel, the filter would be defined based on the visible
resultset, but once copied to this filterer he would work independently.
Tomorow I will share a video to better explain.
Em qua., 8 de mar. de 2023 16:34, Luis Filipe Nassif <
***@***.***> escreveu:
… Related issue: #1184 <#1184>
But with this feature, it won't be needed.
I have discussed this before with @tc-wleite
<https://github.com/tc-wleite> in another issue
I didn't find it, maybe it was a private conversation. The idea was to
change Metadata Filter behavior so it would always behave globally, on all
case items, not just on current result set after applying other filters.
Aggregating filters BitSets using AND would give the same result on main
table. But the values for the selected property and counts in Metadata
filter panel would change if we change its behavior, I'm not sure what
behavior is better, maybe both have pros/cons.
—
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG247S7FTC2TSQSLE6BD6ZLW3DUOTANCNFSM4LMUNLBA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
description, used in the tootip of the filter in the tree.
without removing its defined filters, which are restored when checkbox is checked again.
being added twice). Implement getQuery in SearchFilterer.
I'm closing this since it is already integrated on master and will be released anyway in 4.2.0. |
correspondent CombinedFilterTreeModel where it is created, so it can update the map of Filters with corresponding nodes set when removing or adding one of its children.
structure Map<IFilter, FutureBitSetResult>, as the remove of an item in this cache now only occurs when no other FilterNode refers to the same filter.
they can be cloned when dragging with CTRL button pressed (COPY operation).
Create a central filter manager dialog or tab to list all applied or last filters, so users could enable/disable specific filters, last one or all of them. Currently user needs to go to each tab to disable its filter, that's annoying.
The text was updated successfully, but these errors were encountered: