Search DataStore
Search is a CloudScale component that enables data searching within the indexed columns of your Catalyst Data Store tables. The search process specifies the pattern to search for in the search indexed columns of the tables. You can search for data in multiple tables or just data in search indexed columns.
Using the executeSearchQuery() SDK method you can execute the required search query to search for a particular pattern of data.
The datatore reference used in the code snippet is the component instance.
Create a JSON Configuration
The following code snippet creates a JSON object that contains the attributes of the pattern to be searched for, in the indexed columns of the individual tables.
// Create a config object with the search term, table and indexed columns
let config = {
search: 'santh*',
search_table_columns: {
SampleTable: ['SearchIndexedColumn'],
Users: ['SearchTest']
}
};
Using the JSON object created in the above section is passed as a parameter to the executeSearchQuery() SDK method which returns a promise. The promise returned will be resolved to a JSON object.
// Execute the search query by passing the configuration
const searchResult = await datastore.executeSearchQuery(config);
console.log(searchResult);
Example of Expected Response
An example of the response that you will receive is shown below.
{
AlienCity: [
{
CREATORID: "2136000000006003",
MODIFIEDTIME: "2021-08-13 13:49:19:475",
CityName: "Dallas",
CREATEDTIME: "2021-08-13 13:49:19:475",
ROWID: "2136000000008508"
}
]
}
Last Updated 2026-07-02 14:51:41 +0530 IST
Yes
No
Send your feedback to us