src/Leevel/Database/Condition.php
public function forceIndex($indexs, $type = 'FORCE'): self
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        if (!isset(static::$indexTypes[$type])) {
            throw new InvalidArgumentException(
                sprintf('Invalid Index type `%s`.', $type)
            );
        }

        $type = strtoupper($type);
        $indexs = normalize($indexs);

        foreach ($indexs as $value) {
            $value = normalize($value);

            foreach ($value as $tmp) {
                $this->options['index'][$type][] = $tmp;
            }
        }

        return $this;
    }
public function forceIndex($indexs, $type = 'FORCE'): self
    {
        if ($this->checkFlowControl()) {
            return $this;
        }

        if (!isset(static::$indexTypes[$type])) {
            throw new InvalidArgumentException(
                sprintf('Invalid Index type `%s`.', $type)
            );
        }

        $type = strtoupper($type);
        $indexs = normalize($indexs);

        foreach ($indexs as $value) {
            $value = normalize($value);

            foreach ($value as $tmp) {
                $this->options['index'][$type][] = $tmp;
            }
        }

        return $this;
    }
index 强制索引（或者忽略索引）.

@param array|string $indexs
@param string       $type

@return $this