Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Using the search API

Updated on July 8, 2022
Applicable to deployments with Search and Reporting Service and embedded Elasticsearch.

Find the information you need within your application by using the search API. For example, in your banking application, you can customize the pxRetrieveSearchData activity to retrieve all results that include the word overdue, to analyze the list of pending payments.

  1. In the navigation pane of Dev Studio, click Records.
  2. Expand the Technical category, and then click Activity.
  3. In the list of activities, select the activity in which you want to invoke the pxRetrieveSearchData rule.
  4. On the activity rule form, add the pxRetrieveSearchData rule to your activity:
    1. On the Steps tab, click Add a step.
    2. In the Method field, specify the method that invokes the search API.
      For example: Enter Call Rule-Obj-Report-Definition.pxRetrieveSearchData.
  5. Customize parameters of the search API:
    1. In the step that invokes the search API, click Expand to see method parameters.
    2. In the Method Parameters section, provide details for your search query.
      For example:

      In the pySearchString field, specify single words or whole sentences that you want to find. Enter "(Car OR Bike)Rental" to retrieve records about either car rental or bike rental.

      Note: The pySearchString field supports domain-specific language.

      In the pyReportClassName field, enter the class within which you want to search.

      Note: The system searches for results also within child classes of the class that you specify in the pyReportClassName field.

    3. Optional: To enable fuzzy search, select the pyDoFuzzySearch check box, and then specify the parameters.
      For example: In the pyFuzziness field, specify the number of one-character changes to the word to find approximate results. For the search term Bill, enter 1 to retrieve such results as Hill, Billy, or Bell.
  6. In the upper-right corner of the rule form, click Save.
What to do next: In the activity rule form, you can test the search gadget by clicking ActionsRun .

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us