I managed to get the symbol synonym "+ = plus" to ...
# community-help
e
I managed to get the symbol synonym "+ = plus" to work. Is it possible to make "s21+" match "s21 plus" (notice the whitespace)?
j
In the latest version of Typesense 0.24, you can set
symbols_to_index
in the synonym to
+
and then setup “s21+” and “s21 plus” as synonyms
message has been deleted
e
I wasn't clear enough. Sorry 🙂 That part I got working. "S21 +" matches "S21 Plus". Now I'm wondering if it's possible to get it to match without the whitespace as well? That is probably not related to synonyms or symbols, but maybe some other whitespace related setting?
The synonym I set up is "plus,+".
j
You mean in general, you want any string
string+
to match
string plus
?
e
yes
j
Hmm that won’t be possible to do, because synonyms only kick in when the matched word fully matches and not on partial strings…
May be at indexing time, to every record, you can add another
alternate_names
array field, that stores both [
string+
,
string +
,
string plus
]
and then you can include this field in
query_by
e
ok, I'll do that, thank you! and congratulations on 0.24! It's great!
j
Thank you! 🙂