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
Segmentation: make "Contains" operator case insensitive #8579
Comments
adding to 2.15.0 as hopefully this is a quick fix (and this missing feature causing much confusion for some users) |
hello matt. interesting problem presented here. i spent some time this afternoon looking into it. i just submitted a pull request with a simple fix addressing this issue. actually turned out to be a hash issue and not a problem with the log_action.name field itself which was already UTF8_GENERAL_CI. |
As kinda mentioned in the PR I wouldn't say it is a bug. I'd maybe rather recommend to write a plugin that transforms all URL's into lowercase during tracking if someone wants this behaviour. |
maybe we could assume that "segment contains" implies "case insensitive match" ? ie. when we have "Segment CONTAINS xyz", maybe it's acceptable to include all variations of the xYz xyZ etc. "Contains" uses the |
Yeah but wasn't the problem that there is no index on that column? |
segment CONTAINS uses LIKE and so does not use the index. therefore adding the case insensitivity match, would not change the fact that the "Segment contains" already do not use the index. |
And what about other cases? Like "equals"? I'm not sure if it will be intuitive for users that we sometimes do case sensitive and sometimes not. Reckon docs need to be updated and maybe UI improved to explain it. Maybe there could be "Segment contains case insensitive". In some cases someone might still want to use case sensitive but not sure how often... |
fyi: for "equals" we cannot implement a "case insensitive" because when the operator is "equals", then we use the "hash" match.
👍 doc is at: http://developer.piwik.org/api-reference/reporting-api-segmentation Not sure how we could make it look nice in the UI? Also, we should change "Does not contain" to be similarly case insensitive.
I suggest we change "Contains" to mean "Contains (case insensitive)" and if some users complain in the future, we could consider adding a new "Contains (case sensitive)" (we would need a new segment operator too...) |
I know, that why I meant it will be confusing to apply it in some cases and others not.
For the UI sounds good to me, docs as mentioned need to be updated clearly as well. This is kinda a "breaking change". Need to mention it there as clearly as well which should be easily doable. And we also need to mention that before 2.15 it used to be not case insensitive. Do I get this right that we will now make all |
👍
We can document this:
|
FYI: At least in my local Piwik it looks like it always was case insensitive already as Eg it results either in error:
or even
when column is binary (eg |
In the past we ran some alter table statements to set |
FYI: When we're setting the charset to UTF8 via |
I made a change (in https://github.com/piwik/piwik/compare/8579) but I think there's actually nothing to do for |
As discussed moving issue to 2.15.1 as we cannot reproduce the issue. It seems to be case insensitive already |
Closing for now as it seems to work |
Currently, when creating a Page URL segment, the URL is match case sensitive. This means that if a user inputs any capital letter in the URL, it will not match the URL and no data will be shown. This is confusing to non technical users who are not aware that URL are case sensitive in Piwik segments.
Suggestions:
The text was updated successfully, but these errors were encountered: