Closed ecxyzzy closed 3 weeks ago
Good catch, thanks! I think this is by design for the TO_TSQUERY
function, but is definitely not desirable for our uses. Will look into this and put up an additional commit.
Should be fixed now!
For posterity, the non-government
query was probably exploding because we passed the nodes into another TO_TSQUERY
call, which expanded it unnecessarily. When I was testing in psql
, WEBSEARCH_TO_TSQUERY
would not output a negated node unless the hyphen was the first character in a "word" (separated by spaces).
Looks like escaping the hyphen, except for where it begins a word, helped in this case. Also, queries containing only stop words will now just return an empty array rather than erroring.
Description
Add the
resultType
flag that dictates what types of results are returned by the search endpoint. Can becourse
orinstructor
. Behavior is the same as the endpoint currently if not provided.How Has This Been Tested?
Tested locally with queries using the new flag.
Types of changes
Checklist: