This message was deleted.
# community-help
s
This message was deleted.
l
i'm using these search presets on my code
@Jason Bosco can you help me please?
j
Any reason you’ve enabled
pre_segmented_query: true
- that’s usually only useful for CJK languages?
In any case, there was a related bug that we fixed in a recent RC build. We can upgrade you to this build to see if that addresses this issue as well. Let me know if it’s ok to do this (need to do the upgrade from our side)
l
removed the parameter "pre_segmented_query", it is still really happening, I put it trying to improve the results for searches with 2 words
you can upgrade my cluster
j
I’ve queued it up. You’ll get an email notification once the upgrade is complete. Could you try this query again after that?
l
Of course! Thank you for support
👍 1
is there a parameter in my search preset that I need to improve? The upgrade has concluded here, I have performed the survey and continue with the results
j
Could you try removing the min_len_1typo and min_len_2typo params and see if that helps?
If that also doesn’t help, could you open the browser’s dev console network tab, then do the search query on your site, look for the request to Typesense in the network panel, copy-as-curl and paste it here (minus the API key and hostname)
l
Copy code
curl 'https://HOST/collections/products-production/documents/search?q=flip+rosa&page=1&preset=v4&filter_by=_tags:%3Dbr+%26%26+_tags:%3Dshoppable&per_page=24&x-typesense-api-key=APIKEY' \
  -H 'authority: vgu6qnsy7dz9oat1p.a1.typesense.net' \
  -H 'accept: application/json, text/plain, /' \
  -H 'accept-language: en-US,en;q=0.9' \
  -H 'origin: http://dev.gocase.com.br:3000' \
  -H 'referer: http://dev.gocase.com.br:3000/' \
  -H 'sec-ch-ua: "Chromium";v="110", "Not A(Brand";v="24", "Google Chrome";v="110"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36' \
  --compressed
I remove these parametes but it still happening
j
I don’t see a product with the term “Ros” in your dataset…
l
Can you try 'rostinho', quem i search without last letter it works
j
I do see results for
rostinho
. Here’s what’s happening: When you type
flip ros
, the last word is used to do a prefix search, so it will match
ros...a
,
ros...tinho
, any word that starts with
ros...
But when you type
flip rosa
, now it will prefix search with
rosa
, it will only match results that start with
rosa...
. The reason type typo tolerance doesn’t kick-in here to match
rostinho
is because the word
rosa
is several edit distances away from each other (you would have to delete letter
a
, then add the letters
t i n h o
. Typesense only supports correcting up to 2 typos, for performance reasons and also to avoid user confusion.
You might want to consider setting these as synonyms
✅ 1
l
Thanks! the documentation about synonyms is that? https://typesense.org/docs/0.24.1/api/synonyms.html
j
Correct