-
Notifications
You must be signed in to change notification settings - Fork 3
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
3.1.0 release #327
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.