Users may find that, when they are using the Keyword Search feature along with the regular search fields on a Find screen, fewer records are returned than expected. This may be caused by the Maximum number of results setting under Administration | System | Keyword Search.


This issue will usually be presented where the term being used in the Keyword Search field would be expected to return a large number of results (typically 200).


Here's how the process works for a user searching the Company entity for the word "Training" using keyword search, and a specific postcode (addr_postcode).

1: The Keyword Search component (dtSearch) looks up a list of companies that contain a string of “Training” (or more properly its stem). This results in a list of company IDs being returned.
2: Those IDs are fed back to CRM, which uses them to build the remainder of a standard SQL search query. This is the part where the postcode’s added on.
3: The results of step 3 are then given to the user.

In order to understand this further, try searching for a term using keyword search where at least 200 results are expected to be returned. By default, the number of results are limted to 200. If you check the ewaresql.log from the original query, you’ll see that only 200 IDs are being fed into step 2. So, if there’s only 200 results being returned, then we’re only going to be searching a subset of those for the remaining search terms.

The limiting value can be changed in Administration | System | Keyword Search. Setting the value for Maximum number of results to 0 will remove the limit from step 1, though may cause other issues if a large number of users are querying the keyword search, and if it is indexing a huge amount of data.


The Sage CRM user guide currently states the following:

"Note: By further refining your keyword search using the standard entity find page you are refining the results brought back from CRM by the initial search based on the keyword(s) supplied. If you enter a value into the keyword search box and you enter or select a value from one of the standard search fields, then a keyword search is performed first of all based on the keyword search term supplied. Then, based on the keyword search results retrieved from CRM, these results are further filtered by the values entered or selected from the standard search fields such as the Territory drop-down list."

A case has been raised to the documentation team to have the behaviour described above clarified in the product documentation.