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.

DataSource

The following are constructors for SearchContext.

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

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

  • 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.

Creates an instance of the SearchContext class.

public SearchContext()

The following are properties for SearchContext.

  • searchPhrase

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

  • tableSelections

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

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

public String searchPhrase {get; set;}

Type: String

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

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

Type: List<DataSource.TableSelection>