-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.0] Smart Search: Adding nested taxonomy #21327
Merged
Merged
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
…into j4finder_commonwords
…4finder_commonwords # Conflicts: # installation/sql/mysql/joomla.sql # installation/sql/postgresql/joomla.sql
…4finder_commonwords # Conflicts: # installation/sql/mysql/joomla.sql # installation/sql/postgresql/joomla.sql
…into j4finder_commonwords
…4finder_taxonomy # Conflicts: # components/com_finder/helpers/html/filter.php # libraries/src/Categories/CategoryNode.php
…4finder_taxonomy # Conflicts: # administrator/components/com_finder/tmpl/maps/default.php
…4finder_taxonomy # Conflicts: # administrator/components/com_finder/Service/HTML/Filter.php # administrator/components/com_finder/Table/MapTable.php # administrator/components/com_finder/helpers/indexer/indexer.php # libraries/src/Tree/ImmutableNodeInterface.php # package-lock.json
Right now this depends on #23452 being merged first. |
HLeithner
requested changes
Feb 17, 2019
Co-Authored-By: Hackwar <info@joomlager.de>
Co-Authored-By: Hackwar <info@joomlager.de>
Co-Authored-By: Hackwar <info@joomlager.de>
On index or saving a article I get a fatal error:
|
…into j4finder_taxonomy
…o j4finder_taxonomy
Fixing language branch display
I've made all requested changes. Should be good to go. I can't see that the failing system test is related to this. |
HLeithner
approved these changes
Feb 20, 2019
Looks like an improvement to me! Thanks! |
💃 🍾 Thank you! |
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.
Smart Search has a rather good taxonomy that allows to add a lot of additional filters for the search. However there are 2 flaws:
This PR tries to fix both these flaws.
How does it work?
For legacy finder plugins, everything stays as it was, so we should be pretty much backwards compatible here. However new (or updated) plugins can use the new
FinderIndexerResult::addNestedTaxonomy()
method to add nested taxonomies. This method gets a node object as a parameter, which has to implement at least the ImmutableNodeInterface interface, that is introduced with this PR. Internally it iterates down the tree along its parents, adds each parent as a taxonomy node with the previous node as its parent. In the result object, we are now also storing the taxonomy ID so that we can lookup the right taxonomy again later. The taxonomy table has been changed to a nested set table.How to test?
Apply these changes and make sure that the DB changes are applied, too. Then clear the index and re-run the indexing. You can then see the category filter in the frontend having a nested display, as well as in the backend. Check the taxonomy table in the DB for the nested entries, too.
Check if it properly filters for the respective taxonomies in the frontend when searching.
Enable displaying the taxonomies in the frontend and check that you can disable branches and single taxonomies and that those properly vanish from the filters and the result display. Create Search Filters in the backend and test those, too, if they properly honour the taxonomies.
Status of this PR
This PR is mostly working, but I'm not 100% confident that I caught all changes that are necessary. I think I'm now depending a bit on feedback from you.