Hello again,

After some digging through the sqlite3 source code, I came across the code
for the ICU tokenizer.  After enabling that and then commenting out the one
line where u_foldCase() is called, i.e. icuOpen(), I retested and
case-sensitive searching now seems to work as expected for FTS.

I then tried doing the same thing in icuLikeCompare() by commenting out
both u_foldCase() calls, i.e. for the string and the pattern and seem to
have implemented case-sensitive LIKE searching as well for non FTS tables.

Can anyone see anything wrong with this approach?  I still plan to implement
and register my own tokenizer, but will do it as high-lighted above.

Finally, if this is a valid approach, then can I suggest that an additional
preprocessor macro be defined which would allow this behaviour to be enabled
for the general SQLite release code.

Thanks again,

Dennis

---------- Forwarded message ----------
From: Dennis Suehr <[email protected]>
Date: 11 August 2011 15:31
Subject: Case Sensitive FTS searches.
To: [email protected]


Hello,

I need to implement case-SENSITIVE searching for an FTS(4) table.  As near
as I can determine, that would seem to require a new user-defined tokenizer.

I am hopeful that one or more of you might respond with hints, insights,
experience, etc. which might aid me toward that end.  Specifically, if I do
need to create a new tokenizer, which of the three existing ones, i.e.
simple, porter-stemmer, or icu should I base it on?

Thanks in advance.

- Dennis
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to