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

3.1.0 release #327

Merged
merged 17 commits into from
Nov 16, 2023
Merged

3.1.0 release #327

merged 17 commits into from
Nov 16, 2023

Conversation

finnlewis
Copy link
Member

No description provided.

andybroomfield and others added 17 commits November 10, 2023 13:00
…y provide a new pre_query processor on facets to AND facet groups together while still allowing OR within a facet group. This is based on initial code provided by Andy Broomfield
This test creates 4 facets in two groups, and four directory entries in
a test directory channel.
It then tries to click on each facet, testing that the facets work
(in the default configuration) as OR facets within the group,
and AND facets accross the facet groups.
This will re run the query eliminating each group.
This is to address the issue in this comment
  #235 (comment)

Instead of just using the facets from the result set, re-run the query, each
time eliminating all the facets except each group, and filter out its own
so there is a list of each sibling facet that could be set with an OR that
also mathces an AND in the other group.
This then produces a filtered list of sibling facets that should be reachable
within the AND accross the groups and OR within them.
Just doing some minor cleanup while looking at the code.
The by refernece when fetching the conditions is required as otherwise
the resulting filters are not correctly applied for the new search.

Add the accessCheck(TRUE) to entityQueries.
Verifies that when facets are selected, facets that would offer a possible
selection are visible and not hidden. This occurs due to the way facets are
generated from the result set. Since each facet group is an OR, if there
are entries that could be shown by selecting OR in the group whilst
applying the AND filter from the other groups, they need to be selectable.

Adds a test to verify this with comments to help understand what is going on,
as this is a bit on the complicated side. What should happen is that in each
facet group, if after applying an AND filter from the other group, verify
that the correct facets are visible.

Eg. All facets from group 1 which would apply when facet 3 is selected, and all
facets from group 2 which would apply when facet 1 is selected, and then the
results are combined.
In the above case, facet 2 which is only assigned to content with facet 4
would be hidden as it would be inreachable.
Change the facet filters so that the we test the avalible facets by looping
through each facet group, removing that from the query and seeing what facets
from that group would be returned as an or filter. This is becuase going the
other way (removing the other groups) can lead to situations where possible
facets are removed.
Define $facetEntities as array and fix casing on $facetLabels
[3.x] Facet group OR within AND accross groups
@finnlewis finnlewis merged commit f1cb470 into release-3.x Nov 16, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

None yet

4 participants