Skip to content

[FEATURE] Support PCRE2 in OpenSearch PPL #30

Open
@brijos

Description

@brijos

Here's the feature request formatted in markdown:

Feature Request: PCRE2 Support in OpenSearch PPL

Is your feature request related to a problem?

OpenSearch's PPL currently uses Java regular expressions, which creates compatibility challenges for users who work across different platforms and tools that predominantly use PCRE2. Users are frequently frustrated when their existing regex patterns don't work as expected in OpenSearch PPL, requiring significant modifications. This also creates barriers for users migrating from other platforms where PCRE2 is the standard.

What solution would you like?

Implement PCRE2 support in OpenSearch's PPL either as:

  1. A complete replacement for the current Java regex implementation, or
  2. An alternative option that can be enabled via configuration

The implementation should include:

  • Full PCRE2 library integration
  • Support for advanced PCRE2 features (variable-length lookbehind, conditional patterns, named subpatterns)
  • Configuration options to switch between Java regex and PCRE2
  • Comprehensive documentation and migration tools

What alternatives have you considered?

  1. Creating a translation layer that converts PCRE2 patterns to Java regex patterns
  2. Maintaining the current Java regex implementation with extended features
  3. Developing a custom regex engine that supports both

These alternatives were considered less optimal because:

  • Translation layers may introduce complexity and potential errors
  • Extending Java regex wouldn't provide full PCRE2 compatibility
  • A custom engine would require significant development resources

Do you have any additional context?

  • Many users are migrating from systems that use PCRE2 as standard
  • PCRE2 typically offers better performance for complex patterns
  • Community discussions indicate strong interest in PCRE2 support
  • This change would align OpenSearch with industry standards
  • Similar implementations have been successful in other open-source projects such as Git, Apache HTTP, and Nginx

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions