internal/postgres/symbolsearch: add constructQuery
internal/postgres/symbolsearch: add constructQuery

constructQuery is added as a helper function to construct a query using
a score and a filter.

For golang/go#44142

Change-Id: I528593b30470420f47e34b1b9e9c7470dc7fc70e
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/337474
Trust: Julie Qiu <8d32267b6b4884cf35adeaccde2b6857ae11aace@golang.org>
Run-TryBot: Julie Qiu <8d32267b6b4884cf35adeaccde2b6857ae11aace@golang.org>
TryBot-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: Jamal Carvalho <e0195770807aa8c82b0b128d9c0423b5ad035172@golang.org>

golang/pkgsite,golang/pkgsite,golang/pkgsite,golang/pkgsite