I am new to graph databases in general, I played around with DGraph a bit and I am currently looking into ES X-Pack plugin which gives graph-like functionalities.
My requirement is something like this:
I have an account, a permission_set and bunch of roles. Each account is assigned a specific permission set and each permission set has got bunch of enabled roles.
A role could be an aggregate role, meaning, it could have bunch of roles under them.
When I query with account id - Act001 - I would need to pull all the roles per account(including the aggregated roles).
ie: List[R1, R2, R3, R6, R7, R9, R22]
I was able to achieve it with Dgraph and Dgraph way of storing data is different compared to ES.
Is this possible with elasticsearch graph API?
That's probably not the sweet spot for the elastic graph API because:
Your data is likely to be comparatively small and searched very frequently (authorisation on every user request?). Under the covers the elastic graph API issues a separate search request for each "hop" which hits disk. These sorts of traversals on small, frequently-accessed datasets are probably better handled in RAM.
Elastic graph API has no notion of direction. In your case the traversal from role to subroles is directional and we don't want to crawl from subrole back up to role. That sort of control over direction of travel is not in the simple API we provide so if you were to do this you might as well write code in your client app to loop around the expansions from a series of search requests.
I would say that your specific use case fits a proper graph database. At the best of my understanding, Elasticsearch offers only a graph view on top of a document set considering co-occurrency or terms or word.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.