@NanorPiwik opened this Issue on December 1st 2018

Hi guys,
I am using Matomo 3.7.0
when I create a segment such as, Event Category is not 'my-value' the visitor log report keep showing me visits which include this event.
Is that a known behavior?

@tsteur commented on December 1st 2018 Member
@mattab commented on December 3rd 2018 Member

No idea why we would match null values when using not equals and not contains in https://github.com/matomo-org/matomo/blob/3.8.0-b2/core/Segment/SegmentExpression.php#L233

@tsteur I think the idea is:

  • for not equals eg. "City is not equal to London" then we expect to return all visits that had another city set, or those that didn't have a city set/geo-located.
  • for not contains eg. "Keyword does not contain X" should return entries that had any keyword set, and also no keyword set.
@tsteur commented on December 3rd 2018 Member

I see... didn't even know MySQL wouldn't return those results... just double tested it locally with a null value

select config_device_type from piwik_log_visit where idvisit = 5281842 and config_device_type <> 'foo' where config_device_type is null... the entry was not returned...

not sure how to fix that issue then . I reckon https://github.com/matomo-org/matomo/issues/11900 might fix it, but hard to tell...

Powered by GitHub Issue Mirror