Search Interface Does Not Return the Expected Results in the Coveo for Salesforce Free Edition

For the Coveo for Salesforce Pro and Enterprise equivalent of this page, see Search Interface Does Not Return the Expected Results in the Coveo for Salesforce Pro or Enterprise Edition.

Free edition only

Symptoms

When querying your Coveo components, you get a number of results, but not all the ones you expected to see.

Cause

There are several potential causes for this issue:

  • The user you are using to query the component does not have access to those items. This is the expected behavior.
  • The user who connected Coveo for Salesforce to your Coveo Cloud organization does not have access to the objects or fields you are querying.
  • You have not added the objecttype of your items in the query of your component. Since they rely on the Salesforce index, Coveo for Salesforce Free needs to know which objects need to be returned in your search page.
  • You have entered an invalid query in your component.

Resolution

To solve your issue, review the following points:

  • Ensure your user has access to the items they should have access to. For Lightning components, it is possible to inject a second profile to ensure certain results are always returned, no matter who is querying the component (see Understanding the Advanced Lightning Configuration Options).
  • Ensure the user who connected Coveo for Salesforce to your Coveo Cloud organization has access to the objects and fields you are querying. If they do not, then either grant them access, or reset the link between Coveo for Salesforce and Coveo Cloud.

    Ensure the user resetting the link has access to all the objects and fields you want to return as results, is a member of your Coveo Cloud organization (see Adding and Managing Members), and is never going to be deleted from your Salesforce organization.

    Coveo recommends creating a dedicated Salesforce user that answers to those requirements (see Going to Production with Coveo for Salesforce).

  • Add all of the objecttype from which results should be returned in your search interface (see Using Custom Objects With the Coveo for Salesforce Free Edition).
  • Review all the queries you perform in your components, and ensure that it respects the Coveo Cloud Query Syntax (see Coveo Cloud Query Syntax Reference). This may include in a tab, search interface, or as part of custom code you have written.

    You can view the final query your component sends in the Network tab of your browser Developer Console. For each performed query, two v2/ events are sent. The second one contains the sent query.