How to enable enable search on a custom post type?
We have a custom post type called PegaSocial-Post-CaseSummary for which pulse search is enabled in pyGetPostDataSource but doesn't work. How do we enable pulse search for custom post types. OOTB is supporting only on PegaSocial-Message and PegaSocial-Post-Private classes to fetch in pulse search results.
@rm001 For any new post types (in your case PegaSocial-Post-CaseSummary) developed by implementation teams, below are the configurations that are needed to leverage search capabilities.
1. In pyGetPostDataSource data transform in the post context class, set .pyIsSearchEnabled to true (change to false if search is not required in a later point of time)
2. Ensure pass current parameter page is enabled for the data page related to new post type (which is set to pyDataSourceReference property in pyGetPostDataSource data transform). There are parameters like searchText, searchByUsers, searchToTime, searchFromTime that will be supplied by system to this data page which are used in pxGetContextPosts activity
3. Either add pxObjClass is equal blank in filter by overriding pyPostsByKeys report definition in PegaSocial-Message (to avoid like filter from where clause of SQL) OR save as pyPostsByKeys to the new post class
4. Override pySearchContextPosts report definition into new post class. This is used by the system to search
5. Optionally, if the custom post type related intances are in a table other than pc_work_social and has huge data, create Custom Search Properties for the new post type and create a dedicated index for improved performance
Pre-checks:
1. Ensure search reindexing and elastic search are working fine
2. System should be on platform build 8.5.1 or above
@rm001 For any new post types (in your case PegaSocial-Post-CaseSummary) developed by implementation teams, below are the configurations that are needed to leverage search capabilities.
1. In pyGetPostDataSource data transform in the post context class, set .pyIsSearchEnabled to true (change to false if search is not required in a later point of time)
2. Ensure pass current parameter page is enabled for the data page related to new post type (which is set to pyDataSourceReference property in pyGetPostDataSource data transform). There are parameters like searchText, searchByUsers, searchToTime, searchFromTime that will be supplied by system to this data page which are used in pxGetContextPosts activity
3. Either add pxObjClass is equal blank in filter by overriding pyPostsByKeys report definition in PegaSocial-Message (to avoid like filter from where clause of SQL) OR save as pyPostsByKeys to the new post class
4. Override pySearchContextPosts report definition into new post class. This is used by the system to search
5. Optionally, if the custom post type related intances are in a table other than pc_work_social and has huge data, create Custom Search Properties for the new post type and create a dedicated index for improved performance
Pre-checks:
1. Ensure search reindexing and elastic search are working fine
2. System should be on platform build 8.5.1 or above
3. Override pyShowPulseSearchWidget when rule to enable/display pulse search in any context
Implementation for reference: We can refer to how above mentioned configurations are done for private messages related post type by platform (PegaSocial-Post-Private)
Thanks,
Sai kishore