简体   繁体   中英

Gremlin text comparison predicates

My vertice properties partly contain objects like eg a File object. When searching with "has" I would like to search for Files by path. I think some kind of text comparison predicates that would do the "toString()" conversion might be helpful here.

Are there any standard predicates like this in gremlin/tinkerpop or do I have to implement these my self?

I found two related questions in stackoverflow:

And one of them I answered today with a pointer to the SimpleGraph project's RegexPredicate implementation https://github.com/BITPlan/com.bitplan.simplegraph/blob/master/simplegraph-core/src/main/java/com/bitplan/gremlin/RegexPredicate.java (I am one of the committer of that project)

Currently I'd proceed by adding more helper Predicates like that to the library.

For now you should add your own predicates for text comparisons. TinkerPop has had discussion in the past about adding such support, but no consensus has been achieved on a direction to take.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM