public function searchIn($index, $type = null)
	{
		// Reset the current state, in case the same instance is re-used.
		$this->indices = [];
		$this->types = [];

		$this->searchInIndices((array) $index);

		if ($type !== null) {
			$this->searchInTypes((array) $type);
		}
	}