public static function force_index_list()
    {
        $indexes = func_get_args();

        // No arguments = back to automatic
        if (!$indexes) {
            self::get_indexes(null, true);
            return;
        }

        // Arguments can be a single array
        if (is_array($indexes[0])) {
            $indexes = $indexes[0];
        }

        // Reset to empty first
        self::$all_indexes = array();
        self::$indexes_by_subclass = array();

        // And parse out alternative type combos for arguments and add to allIndexes
        foreach ($indexes as $class => $index) {
            if (is_string($index)) {
                $class = $index;
                $index = singleton($class);
            }
            if (is_numeric($class)) {
                $class = get_class($index);
            }

            self::$all_indexes[$class] = $index;
        }
    }
public static function force_index_list()
    {
        $indexes = func_get_args();

        // No arguments = back to automatic
        if (!$indexes) {
            self::get_indexes(null, true);
            return;
        }

        // Arguments can be a single array
        if (is_array($indexes[0])) {
            $indexes = $indexes[0];
        }

        // Reset to empty first
        self::$all_indexes = array();
        self::$indexes_by_subclass = array();

        // And parse out alternative type combos for arguments and add to allIndexes
        foreach ($indexes as $class => $index) {
            if (is_string($index)) {
                $class = $index;
                $index = singleton($class);
            }
            if (is_numeric($class)) {
                $class = get_class($index);
            }

            self::$all_indexes[$class] = $index;
        }
    }
public static function force_index_list ( ) { $ indexes = func_get_args ( ) ; // No arguments = back to automatic if ( ! $ indexes ) { self :: get_indexes ( null , true ) ; return ; } // Arguments can be a single array if ( is_array ( $ indexes [ 0 ] ) ) { $ indexes = $ indexes [ 0 ] ; } // Reset to empty first self :: $ all_indexes = array ( ) ; self :: $ indexes_by_subclass = array ( ) ; // And parse out alternative type combos for arguments and add to allIndexes foreach ( $ indexes as $ class => $ index ) { if ( is_string ( $ index ) ) { $ class = $ index ; $ index = singleton ( $ class ) ; } if ( is_numeric ( $ class ) ) { $ class = get_class ( $ index ) ; } self :: $ all_indexes [ $ class ] = $ index ; } }
Sometimes, like when in tests, you want to restrain the actual indexes to a subset

Call with one argument - an array of class names, index instances or classname => indexinstance pairs (can be
mixed).
Alternatively call with multiple arguments, each of which is a class name or index instance

From then on, fulltext search system will only see those indexes passed in this most recent call.

Passing in no arguments resets back to automatic index list

Alternatively you can use `FullTextSearch.indexes` to configure a list of indexes via config.
Sometimes like when in tests you want to restrain the actual indexes to a subset