ManabuBeach
ATApache TinkerPop
•Created by Johan on 6/1/2024 in #questions
Does the TinkerGraph in-memory database support List cardinality properties for vertices?
Interesting history. Can’t please everyone :gremlin_smile:
8 replies
ATApache TinkerPop
•Created by Johan on 6/1/2024 in #questions
Does the TinkerGraph in-memory database support List cardinality properties for vertices?
I think in the elementMap description it is documented. Having two similar functions are very confusing.
8 replies
ATApache TinkerPop
•Created by RuS2m on 6/1/2024 in #questions
Analyzing samples of Gremlin Queries in Neptune Notebook
Mr SPOG (subject, predicate, object, graph) comes up a lot. The SPOG page is an important architectural briefing to all Neptune dealing developers.
9 replies
ATApache TinkerPop
•Created by RuS2m on 6/1/2024 in #questions
Analyzing samples of Gremlin Queries in Neptune Notebook
Gremlin allows queries by just property key and values. In my case I could use that to deduce the busiest route in the graph. I am also interested to know if other ways exist.
9 replies
ATApache TinkerPop
•Created by RuS2m on 6/1/2024 in #questions
Analyzing samples of Gremlin Queries in Neptune Notebook
Comment: If you capture the audit log you can definitely capture every query issued. Most of my queries starts with either a label or specific Vertex ID so on my case I will have a good idea what portion is accessed a lot. I also have updatedOn property on both V and E in my schema. Queries involving property is extremely efficient as they will auto index.
9 replies
ATApache TinkerPop
•Created by danielcraig23 on 5/9/2024 in #questions
Is the insertion order guaranteed with this example code?
Note you can do addV twice in the same traversal I think. If you do it’s atomic and do not need to wrap in TX
13 replies
ATApache TinkerPop
•Created by Gil on 4/5/2024 in #questions
Fulltext-search-like features without ElasticSearch, OpenSearch, Solr and such?
A quite a bit of side but I have been working extensively on Google Firebase Firestore lately. The same thing. no case insensitive search what-so-ever. Their suggestion - buy an index service. Not wanting that I just parse out words, lower case them and store them in an array property. Latest gremlin supports RegEx perdicate thoough now, so that's a lot better today.
18 replies
ATApache TinkerPop
•Created by Dragos Ciupureanu on 10/19/2023 in #questions
GraphSON mapper
Do we need to split up into edgesosns and vetexons right?
12 replies
ATApache TinkerPop
•Created by ManabuBeach on 8/3/2023 in #questions
The Cascading Coalescing - Create a V then Create an E in One Shot
A side note to this. All the people on my team "accused me" of not surrounding a gremlin in transaction, making statements like "I have never seen a (stupid) database like in my career.". I said "no need" as we can execute a query atomically even it includes more than one form of inserts. (Now hope I am still right but tell me if I am wrong in saying this.) Provided what I just stated is correct then you will need to be prepared to explain this to people whose frame of minds are in the SQL tx(insert, join other table) kind of a mindset.
15 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
I do not particularly feel these so important or urgent. While it may not be non-efficient, I just resort to more practical host side coding then issue different traversals. For example, I have a patient list but I need to summarize the earliest visit and the latest visit dates plus total number of visits for each patient. This class of problems are not easy for any database, theoretically sub-traversal aggregations can solve this but I am still struggling with how I can do this elegantly and efficiently in pure Gremlin.
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
As for "P" cannot take a dynamic value, would that be a candidate for future improvements in Gremlin? I think it is a fairly common use case to punch in a result of a "subquery"
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
Hope you can take it from here.
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
So in your case as for storing a string as a property it goes like this:
g.addV("regex_collection").property("rx", "why.*)
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
Here is one example from the Practical Gremlin Book
4.4.1. Using a variable to feed a traversal
Sometimes it is very useful to store the result of a query in a variable and then, later on, use that variable to start a new traversal. You may have noticed we did that in the very last example of the prior section where we fed the german variable back in to a traversal. By way of another simple example, the code below stores the result of the first query in the variable austin and then uses it to look for routes from Austin in second query. Notice how we do this by passing the variable containing the Austin vertex into the V() step.
austin=g.V().has('code','AUS').next()
g.V(austin).out()
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
@spmallette I think the question here really is "Can I substitute the argument of a Predicate with a traversal - much like writing a subquery? Or should we have to rely on creating a temporary value via Groovy first then use that as an argument? Can you help?
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
@Sevi, basically you want to store the
regex
as data and definitely that's sort of reverse
of the way we all use regex. What actually I have never constructed a Gremlin is to use a property value and feed that into a Gremlin query in the predicate argument part. Very interesting use case. I am guessing but you are trying to solve a knowledge graph type use case. So I am still hoping others can step in before I can figure that out.19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
In general the Label is similar to table name in SQL or collection name in Mongo. As such those are not usually part of query fields.
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
Perhaps you can describe to us the problem that you want to solve to the extent you can tell us.
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
Sevi I am out most of today but I will get back to you tomorrow but hope others can step in.
19 replies
ATApache TinkerPop
•Created by Sevi on 9/30/2023 in #questions
inverted regex search
I think it is best to use property to match and apparently there is not much performance penalty using properties.
19 replies