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.

SearchContext Class

An instance of SearchContext is provided to the search method on your DataSource.Connection class. The instance corresponds to a search or SOSL request.

Namespace

DataSource

SearchContext Constructors

The following are constructors for SearchContext.

SearchContext(metadata, offset, maxResults, tableSelections, searchPhrase)

Creates an instance of the SearchContext class with the specified parameter values.

Signature

public SearchContext(List<DataSource.Table> metadata, Integer offset, Integer maxResults, List<DataSource.TableSelection> tableSelections, String searchPhrase)

Parameters

  • metadata:

    Type: List<DataSource.Table>

    List of table metadata that describes the external system’s tables to query.

  • offset:

    Type: Integer

    Specifies the starting row offset into the query’s result set.

  • maxResults:

    Type: Integer

    Specifies the maximum number of rows to return in each batch.

  • tableSelections:

    Type: List<DataSource.TableSelection>

    List of queries and their details. The details represent the FROM, ORDER BY, SELECT, and WHERE clauses in each SOQL or SOSL query.

  • searchPhrase:

    Type: String

    The user-entered search string as a case-sensitive single phrase, with all non-alphanumeric characters removed.

SearchContext()

Creates an instance of the SearchContext class.

Signature

public SearchContext()

SearchContext Properties

The following are properties for SearchContext.

searchPhrase

The user-entered search string as a case-sensitive single phrase, with all non-alphanumeric characters removed.

Signature

public String searchPhrase {get; set;}

Property Value

Type: String

tableSelections

List of queries and their details. The details represent the FROM, ORDER BY, SELECT, and WHERE clauses in each SOQL or SOSL query.

Signature

public List<DataSource.TableSelection> tableSelections {get; set;}

Property Value

Type: List<DataSource.TableSelection>