Spin operator form using single-particle basis

I would like to know how does the spin operators look like in 1st quantization. Imagine we have a system of $N$ indistinguishable bosons that that can exist in two internal states $a$ and $b$ (like spin for fermions). Let $\hat{a}^{\dagger}_{i}$ denote creation operator of boson in state $a$ occupying $i$-th single-particle state. Similarly for $b$. I define collective spin operator as $$\hat{S}_x = \frac{1}{2}\sum\limits_{i} \left( \hat{a}^{\dagger}_{i}\hat{b}_i + \hat{b}^{\dagger}_i\hat{a}_i \right)$$ Using single-particle basis $|i,a\rangle$ and $|i,b\rangle$ I would write: $$\hat{S}_x = \frac{1}{2}\sum\limits_{i}\sum\limits_{\alpha=1}^{N} \left( |i,a\rangle_{\alpha}\langle i, b|_{\alpha} + |i,b\rangle_{\alpha}\langle i, a|_{\alpha}\right) = \sum\limits_{\alpha=1}^{N} \frac{1}{2}\left(|a\rangle_{\alpha}\langle b |_{\alpha} + |b\rangle_{\alpha}\langle a |_{\alpha} \right) \sum\limits_{i}|i\rangle_{\alpha}\langle i |_{\alpha} = \sum\limits_{\alpha=1}^{N} \frac{1}{2}\left(|a\rangle_{\alpha}\langle b |_{\alpha} + |b\rangle_{\alpha}\langle a |_{\alpha} \right)$$

Last equality comes from completeness of single-particle basis. Is this result correct?