io.Connect offers a Search API that you can enable in your apps by:
- Installing the
@interopio/search-apilibrary, and - Initialising io.Connect Desktop with the
IOSearchfactory in thelibrariesarray - io.Connect Desktop Documentation - Search > JavaScript
io.Connect Desktop includes a built‑in (default) search provider and you can add custom search providers for your own domains.
In some cases, you may want finer control like:
- Use only your custom providers for certain queries, or
- Disable the default search provider entirely so it never runs, or
- Keep it enabled globally but exclude it from specific queries.
Here’s how
Option 1 – Disable the Default Search Provider via system.json
If you don’t want the default provider to run at all, you can disable it globally in system.json. Simply use the top-level searchProvider key:
{
"searchProvider": {
"enabled": false
}
}
Effect:
- The built‑in provider is disabled.
- Desktop will not return its own results (apps, Workspaces, Layouts, actions).
- All search results must come from your own custom search providers.
If you still want the default provider, but only for some types (e.g., Workspaces and Layouts only), configure types instead:
{
"searchProvider": {
"enabled": true,
"types": ["workspace", "layout"]
}
}
Option 2 – Keep the Default Provider Enabled but Exclude It Per Query
If you want more flexibility, for example:
- Keep the default provider enabled for general user search, but
- Have some search clients or use cases that should only query certain providers (e.g., a custom provider) and effectively ignore the default one
You can do that in JavaScript using the Search API by targeting only the providers you want to execute the query. Below is a base logic in the search provider, where we only print out the search to ensure such a query is received:
const provider = await io.search.registerProvider({ name: "customProvider" });
provider.onQuery((q) => {
console.log(q)
q.done();
});
And from the application executing the search, list all providers and execute the search query only on the one that you want to perform the search. Alternatively, if you have several search providers, you can filter out the default provider:
const expectedProviderName = "customProvider";
const providerData = (await io.search.listProviders()).find((p) => p.name === expectedProviderName);
await io.search.query({ search: "clientlist", providers: [providerData] });