When making Content Search API calls, Sitecore resolves the index based on certain logic which is very well explained here.
In SXA, we do have an option to configure the indexes on the site item, like below.
In Content Search API, is it possible to resolve to these indexes?