You are not logged in.
Pages: 1
Hi everyone,
I'm doing some tests with FTS search, I need to have a mORMot server which will only be accesed as localhost from a Node.js application on the same physical/virtual machine, I already have the server working and doing FTS search like this :
http://localhost:8081/root?sql=SELECT RowId, item FROM ListSearch WHERE item MATCH :('peri*'):
All is working as expected but there are situations where the end user can do a search with a mispelled word e.g. changing a B with a V, or an accented spanish character e.g. i instead of í so for example if the search term would be dosi I would like the search result include also words with dosí and viceversa so I am looking for the Soundex/SoundexFR funcion mentioned on the docs, but I don't know how to ( and if ) the function can be included on a request as shown above.
Can anyone give any help with this ?
Offline
I beg your pardon can I find that on the mORMot docs, or in any of the samples?
Offline
For effective query, you may have to store the soundex 32-bit integer value in a dedicated column, then index it.
But if you want to use pattern matches, you may need to compute the soundex on the fly with the truncated value... but then it will be brute force search, since you can't use an index.
Check for instance https://synopse.info/files/html/Synopse … ml#TITL_22 to find out how to define a custom SQL function, if the existing SOUNDEX/SOUNDEXFR/SOUNDEXES SQLite3 functions are not enough for you.
Offline
Thank you Arnaud, I'll take a look at that
Offline
Pages: 1