--- title: "Search data in tables" url: https://docs.catalyst.zoho.com/en/sdk/java/v1/cloud-scale/search/search-data/ description: "This page describes the method to search data in multiple tables in your Java application with sample code snippets." last_updated: 2025-11-19T15:07:41Z service: Cloud Scale type: general related_links: - name: "Search data in tables - API" url: /en/api/code-reference/cloud-scale/search/execute-search-query/#ExecuteSearchQuery --- # Search Data in Indexed Columns Search executes a `searchQuery()` method to search for a particular pattern of data. You can search: * Data in multiple tables * Only data in search indexed columns To learn more about search please refer to the documentation here. The following code snippet contains the pattern to search for in specified columns of the tables: #### Sample Code Snippet **Package Imports** ```java import com.zc.component.object.ZCRowObject; import com.zc.component.search.ZCSearch; import com.zc.component.search.ZCSearchDetails; ``` ```java //Get an instance of SearchDetails ZCSearchDetails search = ZCSearchDetails.getInstance(); //Set the pattern to be searched search.setSearch("Sa*"); //Create a hashmap for the tables and corresponding column lists to search HashMap<String,List\*> map = new HashMap (); List searchList1 = new ArrayList(); List searchList2 = new ArrayList(); //Add indexed columns of same or different tables to the list searchList1.add("SearchIndexedColumn"); searchList2.add("SearchTest"); //Add the table with its name and the column lists map.put("SampleTable", searchList1); map.put("Users", searchList2); //Set the table-column mapping for searching search.setSearchTableColumns(map); //Execute Search by passing the search instance with the details ArrayList<ZCRowObject> rowList = ZCSearch.getInstance().executeSearchQuery(search); ```