-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
Search results / Configure related records type depending on template. #7376
Conversation
737688b
to
de36d86
Compare
The search API provides the possibility to load related records for each hits. This allows to easily display them in search results but it also slow down a bit the search. Currently only the `list.html` template was displaying them based on the following configuration: ``` resultViewTpls: ... grid: { related: ["parent", "children", "services", "datasets"] }, ``` but user may want to customize this depending on the result template. This move the configuration to the `resultViewTpls` (and preserve previous mechanism) ``` resultViewTpls: ... { tplUrl: "../../catalog/components/" + "search/resultsview/partials/viewtemplates/list.html", tooltip: "List", icon: "fa-bars", related: ["parent", "children", "services", "datasets"] }, ``` so that user can more easily define which relations to load during search depending on the result template used.
de36d86
to
9aaae5f
Compare
Each search results templates display a specific set of fields. Add possibility to exclude unused fields from search to speed up search. At some point, it could be better to declare all required fields for rendering records on a per template basis on top of required fields needed for the JS app logic (eg. privileges, status, draft).
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
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.
Changes look fine, tested and works.
But I can't find how to configure he new related configuration per search template results. If not present, I think should be included.
Added @josegar74 Also updated missing translations. |
@fxprunayre something not critical, but defining a for a template an array of related types to load and later emptying the section, doesn't save the change. You need to set value to |
Added default empty array |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
…plate. (#7376) * Search results / Configure related records type depending on template. The search API provides the possibility to load related records for each hits. This allows to easily display them in search results but it also slow down a bit the search. Currently only the `list.html` template was displaying them based on the following configuration: ``` resultViewTpls: ... grid: { related: ["parent", "children", "services", "datasets"] }, ``` but user may want to customize this depending on the result template. This move the configuration to the `resultViewTpls` (and preserve previous mechanism) ``` resultViewTpls: ... { tplUrl: "../../catalog/components/" + "search/resultsview/partials/viewtemplates/list.html", tooltip: "List", icon: "fa-bars", related: ["parent", "children", "services", "datasets"] }, ``` so that user can more easily define which relations to load during search depending on the result template used. * Search / Optimize field based on current template Each search results templates display a specific set of fields. Add possibility to exclude unused fields from search to speed up search. At some point, it could be better to declare all required fields for rendering records on a per template basis on top of required fields needed for the JS app logic (eg. privileges, status, draft). * Batch edit / Properly init result template config. * Search / Optimize field based on current template / Add admin UI config.
The search API provides the possibility to load related records for each hits. This allows to easily display them in search results but it also slow down a bit the search.
Currently only the
list.html
template was displaying them based on the following configuration:but user may want to customize this depending on the result template.
This move the configuration to the
resultViewTpls
(and preserve previous mechanism)so that user can more easily define which relations to load during search depending on the result template used.
Optimize search to avoid loading field not rendered in a template (eg. table mode don't display abstract and contacts)