On Tue, May 3, 2011 at 10:25 AM, Dotan Cohen <dotanco...@gmail.com> wrote:
> Hi all, I am interested in seeing "fuzzy searching" in SQLite, for
> lack of a better term. This type of search would return more results
> than LIKE currently does today. The search would return matches based
> on expanded criteria, each one may be considered a separate RFE for
> LIKE or for another specialized function (FLIKE, maybe).
>
> 1) Case insensitivity
> This is already implemented in SQLite for ASCII characters, but it
> would be nice to have for the rest of the UTF-8 characters (those
> defined with tolower values, of course).
>
> 2) ASCII-equivalent searching
> This would allow users to search for non-ASCII characters using
> ASCII-equivalents. For example, searching for "beisen" would return
> both "beisen" and "beißen". Another example would be a search for
> "daemon" returning both "daemon" and "dæmon".
>
> 3) Diacritic-elimination searching
> This would allow user to search for words without adding the
> diacritics. For example, searching for "Jose" would return both "Jose"
> and "José". Another example would be a search for "דותן" returning
> both "דותן" and "דוֹתָן"‎.
>
> 4) Punctuation-elimination searching
> This would allow user to search for words without adding punctuation.
> For example, searching for "Marc Anthony" would return both "Marc
> Anthony" and "Marc-Anthony". Another example would be a search for
> "Beer Sheva" returning both "Beer Sheva" and "Be'er Sheva".
>
> I have seen this issue brought up on all types of software, from Anki
> to Kontact to Yum:
> https://groups.google.com/group/ankisrs/browse_thread/thread/6fc8374b75a4bf4f/bbce3eb5e8401356
> https://bugs.kde.org/show_bug.cgi?id=158365
> http://comments.gmane.org/gmane.linux.redhat.fedora.general/389336
>

Such functionality requires a good bit of Unicode support and can be
locale-dependent.  I doubt such a large feature would ever get built
into SQLite.  However, all is not lost -- this behavior can be had
easily in SQLite as-is, using custom collations or sort keys.  I'm
currently using this approach myself and it works quite well.  On
Windows this would be done with LCMapString/LCMapStringEx, I'm sure
ICU has a similar API.

-- 
Cory Nelson
http://int64.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to