neo4j-contrib / neo4j-tinkerpop-api-impl

Implementation of Apache Licensed Neo4j API for Tinkerpop3
Other
24 stars 15 forks source link

Cannot retrieve node with `::` in label name? #20

Open kuzeko opened 4 years ago

kuzeko commented 4 years ago

I have a node with some label that contains ::

But when I run

gts.V().hasLabel("home::simple").count().next();

it returns 0.

Is this a known issue?

Thanks

ldaug commented 4 years ago

In Cypher you can do:

          `home::simple`

When the label contains spaces or special chars. Unsure if it works in tinkerpop, but you can try:

gts.V().hasLabel("home::simple").count().next();

Luke Daugherty

From: M. Lissandrini notifications@github.com Sent: Thursday, August 6, 2020 2:51 PM To: neo4j-contrib/neo4j-tinkerpop-api-impl neo4j-tinkerpop-api-impl@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [neo4j-contrib/neo4j-tinkerpop-api-impl] Cannot retrieve node with :: in label name? (#20)

This message originated Externally. Use proper judgement and caution with attachments, links, or responses. CAUTION: THIS EMAIL IS FROM AN EXTERNAL SOURCE. Internet links, office documents or other attachments may contain viruses. Do not click on a link, open or enable any file unless you trust the sender.

I have a node with some label that contains ::

But when I run

gts.V().hasLabel("home::simple").count().next();

it returns 0.

Is this a known issue?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/neo4j-contrib/neo4j-tinkerpop-api-impl/issues/20__;!!I6-MEfEZPA!Ynn1mbSiP_It_YPnC_LITLgIoK_GTcwCJ1BIjK_zP3JAh_irt8L9Uz5k_KkaLtDA4iEvB_8$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ABZPOZ6CYINK5D4P3BCA4ATR7L3RBANCNFSM4PW35SBQ__;!!I6-MEfEZPA!Ynn1mbSiP_It_YPnC_LITLgIoK_GTcwCJ1BIjK_zP3JAh_irt8L9Uz5k_KkaLtDAoz7_BZU$. — Luke Daugherty Precisely.com

ATTENTION: ----- The information contained in this message (including any files transmitted with this message) may contain proprietary, trade secret or other confidential and/or legally privileged information. Any pricing information contained in this message or in any files transmitted with this message is always confidential and cannot be shared with any third parties without prior written approval from Syncsort. This message is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any use, disclosure, copying or distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and/or Syncsort and destroy all copies of this message in your possession, custody or control.

kuzeko commented 4 years ago

Tried that, does not work

spmallette commented 4 years ago

I'd guess that has something to do with how TinkerPop tried to handle multi-label support :/

https://tinkerpop.apache.org/docs/current/reference/#_multi_label

kuzeko commented 4 years ago

I don't get it ... ?

spmallette commented 4 years ago

I just meant that TinkerPop uses the double colon for special meaning with multi-label support for neo4j. Perhaps it is interfering with your label that happens to have a double colon. Perhaps that is why your query does not work.

kuzeko commented 4 years ago

uh, that is unexpected

spmallette commented 4 years ago

I think I was able to confirm that this is an issue in TinkerPop and related to the special double colon usage I described in previous comments. Labels that have that delimiter added with addV() end up being split automatically. Making the delimiter configurable is an option but given the way things are implemented I think that ends up being "hard" for various reasons. If this issue is of continued concern perhaps it would be best to create an issue in TinkerPop:

https://issues.apache.org/jira/projects/TINKERPOP

kuzeko commented 4 years ago

Ok, I've tried to open the issue.