Hello! I am seeing some strange behavior with `Qu...
# community-help
j
Hello! I am seeing some strange behavior with
Query By
parameters. I would expect that adding a new parameter would either not affect search results, or would increase the number of results. But when I add a parameter, I’m actually seeing fewer results. Can you help me understand why?
j
Hmmm, that sounds like a bug. Could you open up the browser dev console, then repeat the same search again and then copy as curl the request sent to the
.../api/...
endpoint, and then paste just the post request body here which has all the search params?
j
sure
j
Just needed this:
Copy code
--data-raw '{"searches":[{"query_by":"title,slug,categories,description,shortDescription","group_by":"","sort_by":"_text_match:desc","highlight_full_fields":"title,slug,categories,description,shortDescription","collection":"catalogContent_20220729T163000","q":"full stack","facet_by":"","page":1,"per_page":5}]}' \
  --compressed
Could you delete the rest of your message, since it contains auth and session information
j
I’ve deleted the message, thanks
👍 1
j
Will take a look and keep you posted later this evening
j
Thanks. @Rebecca @Doug de Jesus FYI
👍 2
k
Initially, there's no match for "full stack" query so "treat space as typo" behavior kicks in, and "fullstack" is tried as a fallback which produces results. When the "shortDescription" field is added, the phrase "full stack" itself produces results with typo match with the words "fully" and "stack" in a record so we stop there (1 typo match). If you set the
split_joins_tokens: always
then Typesense will always attempt to look for space as typo variations of the query and this will ensure that same set of results are produced with/without the shortDescription field.
j
got it, thanks. I’m sure we would prefer to not treat spaces as a typo, but this is a good fix for now!