Skip to main content


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

Optional: Configuring Elasticsearch

Updated on April 16, 2021

All Pega applications, including Pega Customer Service and Pega Knowledge, use the Elasticsearch engine. You can configure Elasticsearch to fine-tune your search configuration to ensure that the search results meet your business needs.

Pega Knowledge Implementation Guide Pega Knowledge Implementation Guide Pega Knowledge Implementation Guide Pega Knowledge Implementation Guide

Depending on your business requirements, you can specify a search option that returns a broad set of results, or a more specific or exact set of results. Contains is the default search method. See Defining the search method in this section for a complete description of the Elasticsearch configuration options.

Note: The Elasticsearch configuration options in this section apply to Pega Knowledge and Pega Customer Service 8.2 and later.

This section contains the following topics:

  • Defining the search method
  • Configuring fuzzy search
  • Including article attachments in search

Defining the search method

The pySearchMethod property specifies how the Pega Knowledge article search method is conducted. You define the pySearchMethod property in different rules that support searches in the Interaction portal and the Help site.

  • For the Interaction portal, Pega Knowledge sets the default search configuration in the KMSearchParams data transform rule. To override any out-of-the-box configuration, use the KMSearchParamsExtn extension point data transform rule.
  • For the help site, Pega Knowledge sets the search settings in the KMSearchRDHelpSite activity to pass them to the pxRetrieveSearchData search activity. To change the search settings, use the KMSearchRDHelpSite activity.
The following table describes the Elasticsearch configuration options.
Search configuration optionDescription
Exact

Returns articles that contain an exact match for the search term found in the title, abstract, content body, or tags.

Example: Searching for the word “male” returns all articles that contain the word “male.” The results will not return articles that contain the words “female” or “males, because they are not exact matches.

Contains

Searches for the keyword within any word in the article (partial or match). This is the default search method.

Example: Searching for the word “male” returns results that contain the word “female” or “males.”

Note: Fuzzy search capabilities are not available with the Contains search method.
Fuzzy

In addition to performing an Exact search, the Fuzzy search method finds all permutations and combinations of the search term based on the value in the pyPrefixLength field in the fuzzy search settings.

Example: If you search for the word “foot” and the pyPrefixLength field is set to 3, the Fuzzy search method performs an Exact search on the first three letters of the search word, and then executes all permutations and combinations of the characters after the first three letters. A search for “foot” will return results that contain "fool," "food," "foot," and so forth.

The value in the pyPrefixLength field plays a critical role in the results you get when you perform a Fuzzy search. You should set the pyPrefixLength field to 3 (minimum) or greater.

Note: Fuzzy search capabilities are available only if you specify the Exact search method.

For more information about how Elasticsearch implements fuzzy search queries, see the Elasticsearch website (www.elastic.co).

Configuring fuzzy search

Configure fuzzy search to fine-tune your search configuration to ensure that the search results meet your business requirements. Pega Knowledge uses the D_FuzzyConfig data page to configure the fuzzy search options. To change the search settings, use the FuzzySearchConfig data transform, which populates the D_FuzzyConfig data page.

  1. In the header of Dev Studio, search for and then open the D_FuzzyConfig data page.
  2. In the Degree of fuzziness field, select the edit distance, which is the search string length within which the approximate matching of characters occurs:
    • Auto = Auto is the default setting for this field. This setting automatically calculates the required edit distance based on the length of the search term. Selecting an option other than Auto could have potential performance impacts, therefore you should not change this default setting.
    • 0 = For a search string length of one or two characters.
    • 1 = For a search string length of three, four, or five characters.
    • 2 = For a search string length of more than five characters.
    For example, performing a fuzzy search query for the term "catchr" with a degree of fuzziness of 1, returns results such as "catch" (by deleting 1 character) and "catcher" (by adding 1 character), but does not return results such as "catches" (by adding 1 character and replacing 1, which adds up to an edit distance of 2).
  3. In the Maximum expansion terms field, enter the number of alternative spellings for the search string that you want to allow. Note that decreasing this parameter value results in faster search queries, but might not return as many potential matches.
    For example, performing a fuzzy search query for the term "codngi" with the maximum expansion terms of 2, returns only two matches, for example, "code" and "coding."

Including article attachments in search

You can configure Elasticsearch to include an article's attachment in a search. The attachment must contain some text, for example a Microsoft Word or PDF document. Elasticsearch ignores attachments that contain only graphics.

Because attachments are included in the search index, large attachments can impact the search performance. If the search index becomes too large it can cause latency in the search results. As a result, the pyMaxDragDropAttachSizeMB rule in the KMSpecialization rule set limits the file attachment size to 5MB for knowledge articles out-of-the-box, to help ensure the expected performance in production systems.
Note: This rule setting limits the file attachment in the Pega Knowledge application only. It does not restrict file attachments in the Pega Customer Service application.
  1. In the header of Dev Studio, click Configure > System > Settings > Search.
  2. In the Search Indexing section, select the All work and Index attachments check boxes.
    Note: The default Index work attachments field value is set to a maximum of 5 MB. Any document that is attached to an article and is larger than 5 MB is not included in the indexing. Potential performance issues might occur when returning documents larger than 5 MB, therefore, you should not change this value.
  3. In the Security section, select the Customize full-text search check box.
    Ensure that the For specified properties check box is not selected.
  4. In the Default indexes section, in the All work index type row, click Re-index.
  5. Click Save Settings.

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