Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

QuestionSuggestionFilter Class

The Search.QuestionSuggestionFilter class filters results from a call to System.Search.suggest(searchQuery, sObjectType, options) when the SOSL searchQuery contains a FeedItem object.

Namespace

Search

QuestionSuggestionFilter Methods

The following are methods for QuestionSuggestionFilter.

addGroupId(groupId)

Adds a filter to display questions associated with the single specified group whose ID is passed in as an argument. This filter is optional.

Signature

public void addGroupId(String groupId)

Parameters

  • groupId: Type: String The ID for a group.

Return Value

Type: void

Usage

To add more than one group, call the method multiple times.

addNetworkId(networkId)

Adds a filter to display questions associated with the single specified network whose ID is passed in as an argument. This filter is optional.

Signature

public void addNetworkId(String networkId)

Parameters

  • networkId: Type: String The ID of the Experience Cloud site about which you’re retrieving this information.

Return Value

Type: void

Usage

To add more than one network, call the method multiple times.

addUserId(userId)

Adds a filter to display questions belonging to the single specified user whose ID is passed in as an argument. This filter is optional.

Signature

public void addUserId(String userId)

Parameters

  • userId: Type: String The ID for the user.

Return Value

Type: void

Usage

To add more than one user, call the method multiple times.

setGroupIds(groupIds)

Sets a new list of groups to replace the current list of groups where the group IDs are passed in as an argument. This filter is optional.

Signature

public void setGroupIds(List<String> groupIds)

Parameters

  • groupIds: Type: List<String> A list of group IDs.

Return Value

Type: void

setNetworkIds(networkIds)

Sets a new list of networks to replace the current list of networks where the network IDs are passed in as an argument. This filter is optional.

Signature

public void setNetworkIds(List<String> networkIds)

Parameters

  • networkIds: Type: List<String> A list of network IDs.

Return Value

Type: void

setTopicId(topicId)

Sets a filter to display questions associated with the single specified topic whose ID is passed in as an argument. This filter is optional.

Signature

public void setTopicId(String topicId)

Parameters

  • topicId: Type: String The ID for a topic.

Return Value

Type: void

setUserIds(userIds)

Sets a new list of users to replace the current list of users where the users IDs are passed in as an argument. This filter is optional.

Signature

public void setUserIds(List<String> userIds)

Parameters

Return Value

Type: void