lets assume I have got list of all longest common paths for given source say A using below query g.V().hasLabel('A').repeat(out()).until(__.not(out())).path().by('id')
Result: [ { "objects": [ "k", "B", "C" ] },
{ "objects": [ "A", "B", "E" ] },
{ "objects": [ "D", "B", "E" ] } ]
From above result im expecting B,E as longest common subsequence as this path is repeated for path{"A", "B", "E" } and path {"D", "B", "E"}
Gremlin Query to get longest common subsequence for a given source from the Azure Cosmos graph
29 views Asked by place holder At
1
There are 1 answers
Related Questions in AZURE-COSMOSDB
- Not getting Downloaded - "Azure DocumentDB Data Migration Tool"
- createUserDefinedFunction : if already exists?
- Exporting data from Azure DocumentDB
- NodeJS, DocumentDB (Via Docooment) Bulk Insert
- Issue on Azure DocumentDB and Hive integrations on HDInsight using Microsoft Hive ODBC driver
- Using reserved word field name in DocumentDB
- Fire trigger from DocumentDB stored procedure
- How to you use Azure documentdb using php
- DocumentDB IN keyword with Linq
- C# - How do I get an anonymous type and then use the same selector to create an object?
- DocumentDb - query on nested document and root level
- DocumentDB TransientFaultHandling Best Practice
- DocumentDb and floating point truncation
- DocumentDB Change Feed - How to see all changes to a document
- How does DocumentDB changefeed support resume/continuation?
Related Questions in TINKERPOP
- How to efficiently create a vertex with a label and several properties?
- How to query/search/retrieve an Edge with a pair of Vertices in OrientDB using Java API?
- Disable tab to display console commands in the Gremlin console
- Finding vertices with exact edge matches traversing through children
- How to list the nodes associated to a given vertex through intermediate nodes in TinkerPop3?
- Is there a way to define schema constraints on TinkerGraph?
- Best practice: How to specify a vertex's domain 'type' in a graph database
- How to connect to rexster server over rexpro within the java code?
- Tinkerpop Gremlin console not working
- Gremlin Big Pi operation (product of a sequence of terms) followed by id-based summation
- What is tinkerpop?
- How do I traverse the graph given a start point and without knowledge of the final one?
- Gremlin query to get in and out edges for a given Vertex
- TinkerPop Gremlin with Chinese
- java.io.IOException: Connexion reset by peer - Titan Gremlin request to get multiple vertices
Related Questions in AZURE-COSMOSDB-GREMLINAPI
- Azure Cosmos update June 2020 - Gremlin API - "containing" case insensitive?
- Is there a reason why not model social network with SQL API?
- Problem running Gremlin query in CosmosDb
- Connection pool setting in node.js app which connects to Azure GraphDB and query using gremlin
- Bitwise operators in Gremlin
- Where do I set a partitionKey in CosmosDB deployed as a Gremlin instance?
- Graph db with Gremlin property syntax error
- Gremlin Query to fetch all objects till specified level along with sibling nodes
- What are the usual RUs values you expect when you run simple queries?
- Calculating limit in Cosmos DB
- Azure Cosmos Gremlin API: transactions and efficient graph traversal
- Project by, with optional properties
- Azure Graph DB and Gremlin API
- Cannot create leases container (Gremlin API) with /id as partition key, but comos db trigger requires /id as partition key
- Why is my gremlin.net gremlin client not working with azure cosmos graph db
Related Questions in TINKERGRAPH
- Shortest path taking into consideration the weight on tinkergraph in Java
- Tinkerpop3 custom edge id generator
- Cannot access specific vertex by ID, using TinkerGraph in Gremlin Console
- TinkerGraph g.V(ids).drop().iterate() is confusingly slow
- Why does hasNot "resurrect" a dead traversal?
- Gremlin InMemory Client on TinkerGraph
- Mulithreaded reading from tinkergraph
- How to replace, merge, or upsert new edges in Tinkerpop
- Tinkergraph traversal returning an empty array [] on my graph
- In Gremlin, there is a query error when converting TinerGraph to JanusGraph?
- Difference between traversal using gremlin and methods from Graph
- Improve performance removing TinkerGraph vertices
- Graphml generated from tinkerpop cannot be opened by yEd Graph Editor
- Should I declare GryoMapper as a static field?
- To Display employee List with its current status for particular organization in gremlin queries
Related Questions in GREMLINNET
- Exram.Gremlinq 12.3.0 How to implement Emit?
- Gremlin.net throwing exception when using tree
- Tinkerpop Gremlin Query: Find all edges pointing back to a vertex in the current path
- Gremlin.Net: Message with op code [close] is not recognized
- P.Within method in Gremlin.net does not translate the array correctly
- Encountered an error when making Gremlin.Net communicate with JanusGraph in the JanusGraph official website.net introductory tutorial
- Gremlin Query to get longest common subsequence for a given source from the Azure Cosmos graph
- Find Proper Longest Common Subsequence
- Gremlin.net.dll not found
- How to use CreateItemAsync to add an item with a list to an Azure gremlin DB
- gremlin.net how to create vertex/edge with id
- BulkExecution in Azure CosmosDB for ASP.Net MVC 4.7.2 version
- Need a query to retrieve complete graph
- Gremlin.Net.Driver.Exceptions.ConnectionClosedException
- Exception using client and trying to add vertices
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
There is no simple way in Gremlin to take a set of paths results, analyze them, and return common patterns seen across all of the paths. The closest I can think of is to
groupCountby all of the possible sub-parts of the path. If I can think of a clean way to do this in Gremlin I will update the answer, but my initial thinking on this one is that it will be much easier done in application code after the query has run.If the backend implementation allows use of closures/lambdas, that might be an alternative. In general their use is discouraged and many of the TinkerPop implementations disallow them.