Gremlin.net textContains equivalent

2019-07-20 22:06发布

I am using Gremlin.net library to connect to a janus graph server. I am usin cassandra and elasstic search for data storage and indexing. In gremlin language and gremlin console I use textContains to search within the text of a property. I am using Mixed index for that, but I can find the equivalent for that in Gremlin.net Library? can anyone help?

2条回答
看我几分像从前
2楼-- · 2019-07-20 22:46

JanusGraph now has a library that extends Gremlin.Net for aspects that are specific to JanusGraph: JanusGraph.Net.

This library already contains text predicates. So, you can now do this directly in C#:

var songName = g.V().Has("song", "name", Text.TextContains("COMES")).Values<string>("name").Next();
Console.WriteLine(songName); // output: HERE COMES SUNSHINE
查看更多
成全新的幸福
3楼-- · 2019-07-20 22:51

Gremlin.Net will not have that. TinkerPop doesn't have text or geo search predicates that JanusGraph and other systems have. At this point, we leave it to graph providers to develop such extensions. Unfortunately, I'm not aware of any that have done that for all the Gremlin Language Variants like C#, Javascript, etc. I think that DSE Graph is the only graph provider to do that at this point.

查看更多
登录 后发表回答