hi all! hoping this question can fit into a slack ...
# community-help
c
hi all! hoping this question can fit into a slack thread, but let me know if i should move it into an email conversation 🙂 we’re having some issues with the way that typesense is handling synonyms on our platform, leading to less than desirable first, second and third results for a given search. our records are address records, and here’s an example of the issue: for the address 1370 S Ocean BLVD APT 405 Pompano Beach FL 33062, some users might like to input UNIT instead of APT - but having a synonym between these two doesn’t seem to work. even just not having that unit/apt/# there all together seems to work, but having something like UNIT there instead of APT will cause other random addresses with different numbers to rank first, even though none have “unit” anywhere in the record. any ideas? happy to clarify further if needed - thanks in advance!
j
If I’m looking at the right cluster, I see a one-way synonym setup for APT (root) -> UNIT… this will only kick in when the user types in apt. You want to set that up as a multi-way synonym. So leave the root field empty, and add “APT, UNIT” in the synonyms field
Or if you only want Unit to map to apt, and not the other way around, you want to swap the root and synonym in the setup
c
thanks for the reply - i was testing with that earlier. unfortunately, i get the same type of result with that setup
message has been deleted
j
Could you try setting the synonyms all lower-case? There’s a bug in 0.24.1 that makes synonyms and overrides case-sensitive only during synonym resolution when they shouldn’t be… since during query parsing we lower-case all strings
c
interesting, good to know. unfortunately seems like the same result still:
shouldn’t it still be matching the “101” after unit though?
if i don’t include unit/apt at all, it matches properly:
j
Could we try upgrading you to the latest RC build to see if some of the tangentially related issues we’ve fixed around synonym resolution addresses this use-case?
c
sure! we’ve got a production one in there that i’d rather not touch, do you need the ID of the cluster i’d want to upgrade?
j
You can actually do the upgrade from Cluster Configuration > Modify. You want to pick
0.25.0.rc60
as the version
❤️ 1
c
will try and report back, thanks
👍 1
@Jason Bosco updating resolved the issue - but unfortunately now our latency times are dramatically increased on this build (avg of 10 seconds instead of 300-400ms) any ideas? should i try rebuilding the cluster?
j
Hmmm, that’s not good. Could you open the network tab in the browser dev console, do the search query, look for a request to
multi_search
, copy as curl and DM it to me? We can then take a closer look