How to change search index for a view in the Views We made a lot views using Views module type of Search API index#1. Now, we realize that we need to go with another index#2. Is there any way to change indexes in existing Views? Can anyone point me in right direction?

Thank in advance!
I also had this problem after realizing switching indexes also requires changing the view's index. So to accomplish that quickest way I could think of was to change these values from the ‘export’ of the original index being used.

Main lines of original view:

    $view = new view();
    $view-&gt;name = 'es_connector';
    $view-&gt;description = 'Search box based on elasticsearch (connector)';
    $view-&gt;tag = 'default';
    $view-&gt;base_table = 'search_api_index_es_connector_index';
    $view-&gt;human_name = 'ES Connector';


New search view:

    $view = new view();
    $view-&gt;name = 'es_connector_rebuild’; // changed arbitrarily to my new view name
    $view-&gt;description = 'Search box based on elasticsearch (connector)';
    $view-&gt;tag = 'default';
    $view-&gt;base_table = 'search_api_index_es_connector_rebuild’; // changed to work - see below as to how determined
    $view-&gt;human_name = 'ES Connector Rebuild’; // changed arbitrarily


To find the name of base table click name of your new index (admin/config/search/search_api/index/) and append search_api_index_ with the machine name. Find and replace any occurance of your new view name.

Then paste all of the export into an import script. This will leave you with a new view based on the new index (with the original search view still available). Then just swap out the new search block for the old one. You also probably need to change the path under page settings of the  view.