-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case insensitive search no supported #290
Comments
we're also looking for this feature. Any updates ? |
Doing this completely transparently in CQEngine would be non-trivial,
because fundamentally uppercase and lowercase characters are represented by
different bytes. It means many indexes like HashIndex would not support
case insensitive search.
However it's pretty easy to solve this/workaround it in your application.
Let's say you wanted case-insensitive search for a field MyObject.foo -
1. Define a FOO_LOWERCASE attribute, which returns
object.foo.toLowerCase(). This way you won't actually need to modify your
domain objects or store the lowercase text per-se (if you don't want to),
the attribute will convert it on-the-fly.
2. When constructing your query, convert the query text .toLowerCase() and
use that in your query on the FOO_LOWERCASE attribute.
You can then add any indexes on the FOO_LOWERCASE attribute if you wish.
Hope that helps,
Niall
…On Thu 16 Sep 2021, 16:26 ankursharma180, ***@***.***> wrote:
we're also looking for this feature. Any updates ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#290 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVYTCS4G3OWW2MUIZG27PDUCIEEBANCNFSM5C2WYYTQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I want to use case insensitive in like query which seems to be not supported with cq
The text was updated successfully, but these errors were encountered: