Skip to content

Grep filter for numerical fields#129

Merged
jordansissel merged 1 commit intoelastic:masterfrom
philcowans:master
Mar 29, 2012
Merged

Grep filter for numerical fields#129
jordansissel merged 1 commit intoelastic:masterfrom
philcowans:master

Conversation

@philcowans
Copy link
Copy Markdown

Hi,

I've been running into problems when trying to filter on numerical event fields, such as severity and facility for syslog events. This causes an exception when the regexp is applied to a Fixnum.

I've attached a simple patch to convert numerical fields to strings before matching - not sure if this is useful or not.

Cheers,
Phil

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will merge and make the following change:

>> Fixnum.ancestors
=> [Fixnum, Integer, Numeric, Comparable, Object, Kernel, BasicObject]

I think this should check: if value.is_a?(Numeric)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants