-
Notifications
You must be signed in to change notification settings - Fork 45
[FEATURE] Provide structure paths/breadcrumbs to search results #1796
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
base: main
Are you sure you want to change the base?
Conversation
|
Please fix the PHPStan issue and adjust the failing test. When all checks succeed I am happy to review this! |
|
okay, i have found out why the test failed. now everything passed. |
sebastian-meyer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Thank you very much for this great feature!
Could you please extend documentation for this feature and also include all necessary migration steps when upgrading?
|
I have added the new plugin property to the documentation and i have also updated the administrators instructions for the upgrade path from version 5.1/6.0 to 7.0 ... kind of prematurely for the upcoming release. To be honest i am not quite sure, if its required in the backend to use "maintenance -> flush cache" in order for the updated extension configuration to be loaded? and if there is a different path or if manual intervention is even required to register the new field in the configuration in a composer based installation (settings.php) or a legacy installation (LocalConfiguration.php). If there are any steps required, it would then luckily only require one additional sentence in the documentation. Maybe you know the answer out of your pocket? |
This PR adds a new feature, that (if activated in settings) displays the structure path to a search result (comparable to a breadcrumb) in the list view.
Current situation:
In the search result sets the documents have either...
dmdsec-Sections or the@LABELfrom the ToC, and a page number => in the case for metadata searchIn both cases users cannot know, where within the logical structure of the document, the search result actually appears. Meaning, that a title like "Krankheiten" could both be in "Kapitel 1: Tiere" or "Kapitel 2: Pflanzen" and we would not know before hand. The same logic applies to fulltext results, where we know nothing of this at all and are completly lost.
Solution:
This PR adds a setting to the
ListView Pluginthat allows for displaying this information. For this to work:structure_pathwas added, that holds a JSON encoded representation of the structure path/breadcrumb, which is required, so that thetype(= structure without a customlabel) can still be translated after retrieval to the correct language. The field is multivalued, because physical pages can be associated with multiple logical structures (= end of "Kapitel 1" and beginning of "Kapitel 2".schema.xml, so that the field is actually defined and used in your instance. Otherwise indexing will fail.This PR provides the necessary changes to the schema.xml, translation files, listview flexform, the indexer and solrsearch/result as well as to the listview controller and corresponding templates.
Examples:
Volltextsuche nach "Fischer"
Metadatensuche nach "Optik"
Volltextsuche nach "Schmied"