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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
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