Search Index does not work with attachment in Pega Platform 8x
I am observing an issue that Search Index does not work with attachment in Pega Platform 8x. It works fine in 7x. Please see below step to reproduce the issue.
Pega Platform 7x
(1) Create a text file that includes a string ("XYZ").
(2) Create a work object and attach the text file to it.
(2) At this point, an object whose class is "Data-WorkAttach-File" is attached in pyAttachments in pyWorkPage.
(3) If you search the work object by the string ("XYZ") from end user portal, you can locate it.
We have now verified that attachment works well with Full-Text-Search in 7x.
Pega Platform 8x
(1) Create a work object and attach the same text file to it. In 8x, there is no out-of-the-box user interface for Link-Attachment any longer (I guess it is deprecated). Instead, you see a new user interface, "content" as below.
(2) This new "content" is an instance of a different class than an old 7x class, called "PegaSocial-Document" with prefix "DOC-".
This work object is persisted in a physical table "PC_WORK_DOCUMENT" as below.
(4) Though internal mechanism has been changed, I would still expect that you can search the work object by string ("XYZ"). However, I was unable to locate it.
Is this because (1) Search Index is not designed to work with this new "content" class, or (2) I am just missing any Kafka configuration somewhere.
***Edited by Moderator Marissa to update platform capability tags****
Let me share my analysis. Initially I thought Full-Text-Search excludes PegaSocial-Document class, but it was not true. PegaSocial-Document class inherits Work-Cover class and it is part of Work. So as long as you enable Work in Search Index settings as below, ElasticSearch builds indices file properly.
Now, problem is our Pega side. Below UI is designed to display certain scope of Work instances, not any instance (for example, you can't show Rule- or Data- instance). Currently, PegaSocial-Document class is excluded in the constructed data page and hence it is not showing "DOCUMENT". I tried to private edit an activity to remove the limit, and it started to show DOCUMENT as below.
Now, questions are:
#1. Is my analysis above correct?
#2, If yes, is it designed as such (i.e. DOCUMENT is not supposed to be searched in that field), or is this a product defect.
Are you able to search the new Work-Object that you have created ?
If you re not able to search that as well, then your search itself might not be getting updated. In that case you would want to check if the Data Flow (pxIncrementalIndexer) is in running state or stopped state (as you have mentioned that the stream service is already up running fine).
I have done some research & found that there is a data transform named "pyPopulateClassesForSearch" ,This DT has the required logic to decide which classes should be considered for search.
There is a page ClassOfWOS of type "Work-" .In step 3 of this DT,set method is being used to add classes eligible for search.Since there is no "PegaSocial-Document" so It doesn't o for document search.
I can suggest a local change to achieve this functionality, Please add a set step in this DT like below.
ClassOfWOS.pyObjClasses(<APPEND>)) equal to "PegaSocial-Document".
I will recommend you to report this to Pega so that they can add this feature in future releases.
Hope you got the answer. If yes, please mark this as correct/helpful.
If you take a look at my prior post, I have already figured your suggestion.
> Currently, PegaSocial-Document class is excluded in the constructed data page and hence it is not showing "DOCUMENT". I tried to private edit an activity to remove the limit, and it started to show DOCUMENT..
Your experiment is the same as what I have done, and I know this approach at least works. My question is product engineering team may be aware of this, and they might have intentionally done this (ex. DOCUMENT has to be searched in DOCUMENT gadget, not from this text input field). I would like to have product team's feedback in this thread so I know the proper direction.