Skip to content

[feature request] make regex work on field keys and values #2715

Closed
@kurtharriger

Description

@kurtharriger

The following query returns results:
select * from "multiHistReport" where time > now() - 1h and eventDescription='component ready' and userAgent= 'Chrome' and pageHash= '_iterationstatus' order by asc

but this query does not:
select * from "multiHistReport" where time > now() - 1h and eventDescription='component ready' and userAgent=~ /Chrome/ and pageHash= '_iterationstatus' order by asc

The difference is the regex for userAgent.

I have found influx 0.9 to require a space after ~ and other regex expressions work fine so not sure why this one does not.

Activity

kurtharriger

kurtharriger commented on May 31, 2015

@kurtharriger
Author

It occurred to me what is different in this case.
I ported a samza job targeting influx 0.8 to influx 0.9. In influx 0.8 these were fields, when I ported it to influx 0.9 I did not change this to be tags.

So the difference it would seem is that regex only works on tags not fields.

changed the title regex doesn't work in this case (0.9-rc31) regex doesn't work on fields only tags (0.9-rc31) on May 31, 2015
kurtharriger

kurtharriger commented on May 31, 2015

@kurtharriger
Author

I moved the field values into tags and confirmed I was then able to use a regex.
However, I did need to drop and recreate the database for this to work. It appears if a field with the column name exists the regex does not work even if tag column is also present.

added this to the 0.9.0 milestone on Jun 1, 2015
pauldix

pauldix commented on Jun 1, 2015

@pauldix
Member

What if you make the regex /.*Chrome.*/?

kurtharriger

kurtharriger commented on Jun 1, 2015

@kurtharriger
Author

I had tried that too without success before moving the columns to tags.

beckettsean

beckettsean commented on Jun 1, 2015

@beckettsean
Contributor

Issue #2615 already opened to prevent duplicate tag and field keys. #2714 will fix the =~ 'literal' bug.

modified the milestones: 0.9.2, 0.9.0 on Jun 16, 2015
changed the title regex doesn't work on fields only tags (0.9-rc31) [feature request] make regex work on field keys and values on Jun 16, 2015
removed this from the 0.9.2 milestone on Jul 29, 2015

26 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

    Participants

    @pauldix@toddboom@kurtharriger@thunderstumpges@jsternberg

    Issue actions

      [feature request] make regex work on field keys and values · Issue #2715 · influxdata/influxdb