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.
  • tableSelections
    List of queries and their details. The details represent the FROM, ORDER BY, SELECT, and WHERE clauses in each SOQL or SOSL query.

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>