public function alterQuery($query, $index)
    {
        if ($this->isFieldFiltered('_subsite', $query) || !$this->appliesToEnvironment()) {
            return;
        }

        $subsite = $this->currentState();
        $query->addFilter('_subsite', [$subsite, SearchQuery::$missing]);
    }