We have made customization for pzSearch activity in PRPC 6.3, now our application is upgraded to Pega 7.1.7 and we are facing issue with that search activity. Below is the error which we are facing while tracing.
Failed to compile generated Java com.pegarules.generated.activity.ra_action_searchlpslucene_cf7408e28a85edafcdf7ab03130c0039: ---------- 1. ERROR in com/pegarules/generated/activity/ra_action_searchlpslucene_cf7408e28a85edafcdf7ab03130c0039.java (at line 604) com.pega.apache.lucene.analysis.Analyzer PEGA_ANALYZER_WITHOUT_STOPWORDS = new com.pega.apache.lucene.analysis.standard.StandardAnalyzer( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ An anonymous class cannot subclass the final class StandardAnalyzer
1. Yes, we do have right version of code and we even tried by doing a private edit to already existing customized activity but the issue is reproducible.
2. Yes, we did re-indexing after upgrade.
3. Below is our use case description:
In our app we provided an option for user to search Cases and in back ground we are calling the ootb activity used by the Pega i.e pzSearchLucene.
What we customized for our search was, eliminated data and rule search, instead only work items have to be searched.
We provided two options for the user one is direct text search and other is we provided an option where user can select particular property and give the value for that property, and get a case from DB with these particular details.
1) This is strange because this was seen in versions prior to 6.3 upgraded to 6.3 or beyond, including Pega 7. I am assuming this was working fine for you in 6.3. Could you please confirm your 6.3 build number where this was working?
2) Elastic Search uses a completely different API and our existing search code has been modified to support that. Any customizations made would have to be re-done.
3) There are two list views that supported full text search. One was for developer portal - pySearchResults and the other for end user portals - pySearchResultsWork. Note that the first one did rule and data search whereas the second one did only work search and was later enhanced to work with data search for tags associated with cases. So I am not sure why you needed to customized it. Also, specific customization was provided using the activity DATA-FIND-SEARCH!PYSEARCHPARAMS where additional filters could be specified.
As you stated in step that we have tow listviews one for developer and other for user portal, the same we are using in our app mentioned for user portal. The only difference we replaced the getcontent activity of the listview with pzsearchresults ootb activity used by pega with a different name to search work items in our app. Before upgrade it was working perfectly fine but after upgrade we are getting an exception in the java step of internal activity named pzsearchlucene shown below.
"Test compilation failed: ----------
1. ERROR in Rule_Obj_Activity_Data_Find_Search_SearchLPSLucene_Action_20151203T100944_928_GMT.java (at line 617)
com.pega.apache.lucene.analysis.Analyzer PEGA_ANALYZER_WITHOUT_STOPWORDS = new com.pega.apache.lucene.analysis.standard.StandardAnalyzer(
As requested earlier, can you share your 6.3 environment details in terms what hotfixes are present and what build number you were using?
pega.search() is a private API for search and changes made to the implementation of this API supports out of the box search functionality (whatever the underlying technology maybe). Customized search functionality should be re-built to use the OOTB search API.
That explains why you are getting compilation errors. The Lucene version in 6.1 SP2 was 3.0.0 and it was upgraded to 3.5.0 in 6.3. Since your initial post mentioned 6.3, I was confused on why you were still seeing errors. Lucene broke compatibility between 3.0.0 and 3.5.0 and all code was modified to work with the new APIs in 6.3.
That said, we no longer use Lucene 3.5.0 (even though the jar is still present in 7.1.7). We use Elastic Search as our search library and their API is completely different than Lucene even though its built on top of Lucene.
Since we have a use case of case search which is build and working in production, now again when we are going to upgrade to 7.1.7 these will not work.
So kindly suggest on how we can overcome these errors by providing same functionality
In our use case we are not only providing ability to do a global context search for not resolved cases but we are also providing a filter condition for the user to search accordingly on certain properties to be selected and given values.
If possible kindly provided related information on how to implement elastic search api its methods along with description.
Please note that same APIs that were provided in prior releases will work seamlessly with Elastic Search. I don't have the full context / code to understand the customization made. So to give you a direct answer on how this can be changed would be difficult. To start with, you can see how the search control on the out of the box pyCaseManager portal works in 7.1.7 or beyond. Tracer will show you the activities and other rules involved and you can leverage the same code for your customization.
That said, I would highly discourage you from doing so. Instead I would suggest you reach out to our customer support or your account executive to engage Pega professionals to migrate this over to use our out of the box APIs.