TITLE: Does the functor Sch to Top have a right adjoint?
QUESTION [17 upvotes]: Let $S$ be a scheme, let $T$ be an $S$-scheme, and let $M$ be a set. Let $M_{S}$ be the disjoint union of $M$ copies of $S$, considered as an $S$-scheme. (Notation from [SGA 3, Exp. I, 1.8].) Then $S$-scheme morphisms $T \to M_{S}$ correspond to locally constant functions $T \to M$, i.e. continuous functions $T \to M$ where $M$ is given the discrete topology. The functor $G_{0} : \operatorname{Set} \to \operatorname{Sch}/S$ sending $M \mapsto M_{S}$ is a sort of "partial right adjoint" to the functor $F : \operatorname{Sch}/S \to \operatorname{Top}$ sending $(T,\mathscr{O}_{T}) \mapsto T$, i.e. taking the underlying topological space of the $S$-scheme.

Can the functor $G_{0}$ be extended to a right adjoint $G : \operatorname{Top} \to \operatorname{Sch}/S$ of $F$?

My naive guess is to take a topological space $X$, give $X_{S} := S \times X$ the product topology and set $\mathscr{O}_{X_{S}} := \pi^{-1}(\mathscr{O}_{S})$ where $\pi : X_{S} \to S$ is the projection. Then $(X_{S},\mathscr{O}_{X_{S}})$ is indeed a locally ringed space and gives the usual construction when $X$ is a discrete space, but in general it is not a scheme. Consider $S = \operatorname{Spec} k$ and $X = \{x_{1},x_{2}\}$ the two-point set with the trivial topology; then the only open subsets of $X_{S}$ as defined above are $\emptyset$ and $X_{S}$ itself, so that $X_{S}$ is not even a sober space.

What if I restrict the target category of $F$ to the category of sober spaces?

The product of sober spaces is sober, so it's no longer immediately clear to me whether the above construction fails.

REPLY [24 votes]: Another way to see that the functor $\mathrm{Sch} \to \mathrm{Top}$ is not a left adjoint is to see that it does not preserve colimits. In this MO answer, Laurent Moret-Bailley gives an example of a pair of arrows $Z \rightrightarrows X$ in $\mathrm{Sch}$, such that the canonical map from $X$ to the coequalizer $Y$ is not surjective (as a function between the sets of points of the underlying spaces). Since in $\mathrm{Top}$ those canonical maps to the coequalizer are always surjective, this coequalizer cannot be preserved by the forgetful functor.