Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Knowledge Management articles search is slow

SA-83080

Summary



Knowledge Management articles Search takes more than 40 seconds to return results.


Error Messages



Not Applicable


Steps to Reproduce

  1. Log in with the end user portal access group similar to the out-of-the-box ExternalKMUserAG access group.
  2. Display the default or basic articles of each category. 
  3. Search for the articles.
  4. Open the required article.


Root Cause



The problem is in the performance of executing queries by the Elastic Search. Executing a query with a single word is faster, but is still considered slow (about 20 seconds). This is due to how the query is constructed. According to the logs, the platform always executes queries in the CONTAINS mode which adds wildcards around a word, such as, DNS, Out, or Opt.

The workaround for this is to use quotation marks such as, "DNS" when the client is referring to it as the mode EXACT.

According to the Elastic Search documentation, using Wildcards in queries is expensive and must be avoided if possible. However, queries without a '*' are fast, and this is what Elastic Search is designed for.



Resolution



Perform the following local-change:
  1. Use quotation marks to perform an exact search for each work,

    For example,

    "DNS" "Opt" "Out" (This is fast. All the documents containing the three words DNS, Opt and Out are searched.)
    "DNS" "Opt" Out (This is slow. All the documents containing the words, DNS and Opt and also a word which contains a substring Out are searched.)

  2. Change the CONTAINS type in the Search activity to EXACT.

    Now, the quotation marks are not required. However, CONTAINS can be enforced to be used.

    The two earlier example queries can be rewritten as:

    DNS Opt Out
    DNS Opt Out

    Additionally, the client can also include queries such as, Out* or *Out

Suggest Edit

Published October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us