JanusGraph / JanusGraph/janusgraph

Document supported regular expressions

Open
#1,377 0 comments 1 reaction 0 assignees View on GitHub
area/docs
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

The docs currently only mention that regular expressions can be used with the predicates `textContainsRegex` and `textRegex`, but not what kind of regular expressions are supported. This leads to confusion when users try things that are not supported like anchors for example, e.g., this doesn't work:
```groovy
g.E().has('reason',textContainsRegex('^loves')).values('reason')
```
Without having looked in the source code, I assume that the limitations are based on the index backends. So, we could simply point at their documentation for this matter. The Elasticsearch docs document the supported operators and also mention that the Lucene RegEx engine is used.[\[1\]](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-regexp-query.html#regexp-syntax)

Contributor guide

Open the contributing guide

Research direction

Start by locating the documentation for the textContainsRegex and textRegex predicates, then compare their behavior with the Elasticsearch regexp query and Lucene RegExp syntax referenced in the issue. Done means the docs clearly state the supported regular-expression features and limitations, including why anchors such as ^loves do not work.

Written by the indexing model from the issue text.

Assessment

Tech stack
elasticsearch
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.