[ 
https://issues.apache.org/jira/browse/TINKERPOP-2652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17507673#comment-17507673
 ] 

ASF GitHub Bot commented on TINKERPOP-2652:
-------------------------------------------

divijvaidya commented on pull request #1542:
URL: https://github.com/apache/tinkerpop/pull/1542#issuecomment-1069220769


   > I believe your issue was satisfied by documentation which you wrote was a 
way to settle it with: "Continue using TextP.regex() syntax but clarify the 
behaviour explicitly".
   > 
   > 
https://github.com/apache/tinkerpop/pull/1542/files#diff-aa69bbbf8224e408ea19bf3df1466e16e6309bcfb241f68b578032d9fbbbd48dR4204-R4214
   > 
   > 
https://github.com/apache/tinkerpop/pull/1542/files#diff-a523495c08b5b75fe43826198bab44206a235fc4af4ffc7a40bc684cf817fc71R484-R503
   
   Perhaps I should have clarified myself. I still wanted to have a discussion 
on option 1 vs. option 2 that I suggested in the comment 
https://github.com/apache/tinkerpop/pull/1542#discussion_r782965129 . I would 
have favoured option 2. Nevertheless, I would like to understand the advantages 
of choosing option 1 over option 2 here.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> Add TextP.regex to the text predicate set
> -----------------------------------------
>
>                 Key: TINKERPOP-2652
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2652
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: process
>    Affects Versions: 3.6.0
>            Reporter: Kelvin Lawrence
>            Assignee: Kelvin R. Lawrence
>            Priority: Major
>             Fix For: 3.6.0
>
>
> We have over the years, going back to a discussion thread from January 2018 
> [https://lists.apache.org/thread/r76r47jjxmomz9hvsx96www6r8qnh60t] had 
> discussions of various text predicates that Gremlin lacks but are commonly 
> found in other query languages such as SPARQL and Cypher. We currently have 
> some TextP predicates, but not a specific regex one. I propose we add 
> TextP.regex and for the reference implementation leverage the Java Pattern 
> and Matcher classes. It may be that other implementations will choose to use 
> a different REGEX engine but at least this will get the support into the 
> Gremlin language. As a first pass, I envision this can be something quite 
> simple along these lines (from a small prototype I put together).
>  
> {code:java}
>          \,,,/
>          (o o)
> -----oOOo-(3)-oOOo-----
> plugin activated: tinkerpop.server
> plugin activated: tinkerpop.utilities
> plugin activated: tinkerpop.tinkergraph
> gremlin> g=traversal().withGraph(TinkerGraph.open())
> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
> gremlin> g.addV('test').property('k1','I like llamas')
> ==>v[0]
> gremlin> g.V().has('k1',TextP.regex("l[i|x]ke"))
> ==>v[0]
> gremlin> g.V().has('city',TextP.regex("^Dallas"))                             
>               
> ==>v[8]                                                                       
>               
> ==>v[186] {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to