Skip to content

Add support for regex search #347

@dkharms

Description

@dkharms

We plan to add support for searching using regular expressions on indexable fields of type keyword.

A few words about the implementation:

  • We decided that the filter name will be re;
  • The regular expression engine will be the regexp package from the Golang standard library. It offers rich functionality while being safe from ReDoS, since this engine does not support backreferences.

Example usage of the new filter for finding Russian phone numbers:

phone:re("[+7|8]\s?\(?\d{3}\)?\s?\d{3}-?\d{2}-?\d{2}")

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions