Creating Associated Facets
An associated facet is a facet that is associated with a specific field value, such as an employee ID or the current user ID. This enables that associated facet value to be filtered automatically by the facet association value. These facets appear in the facet pane within a separate facet node entitled “My Association” for example (default). All other facets in the facet pane behave normally, and the My Association facet node appears only if search results associated to the current user exist for the current search request.
For example, consider users accessing a component where job postings are created and managed. A hiring manager may want to have a facet category containing only search results associated with her, which might contain only those job postings she created. Likewise, a recruiter may want to have a facet category containing results associated only with him, such as the job openings for which he is the recruiter.
If you intend to implement associated facets for custom search categories, it is recommended that you examine the associated facets in your delivered PeopleSoft application search definitions and search categories to see examples. The following list provides general recommendations:
-
You need to ensure that the facet association value is available in your table structure, your query or connected query, and that the value is indexed. Or, you can reference an application class, which will determine the association value programmatically.
-
Only hierarchical search attributes can be associated facets. Define a hierarchy-based faceted attribute in the search definition, where the first level acts as the key for the facet association, for example user ID or employee ID, and the second level being the association, such as A.OPRID/HRS_ASSOCIATION_CD. It is recommended that at the association level, you reference a translate value (XLAT), such as hiring manager, recruiter, and so on.
-
In cases, where the first level of the facet association is not user ID or employee ID, which PeopleTools populates, the PeopleSoft application delivers an application class to determine this value. If you are creating custom search definitions and categories, you will need to create the application class.