Pedro Junior
Pedro Junior

Reputation: 99

JanusGraph - How is the data is stored in ElasticSearch and Cassandra?

I'm using JanusGraph with ElasticSearch and Cassandra.

My question is how JanusGraph stores the data when I create a new entity in case that I'm using two databases (JanusGraph and ElasticSearch)

I could understand that ElasticSearch is used as index backend and Cassandra is the storage, but:

  1. What JanusGraph does when I persist a new data ? It'll duplicate the same data into Cassandra and also on ElasticSearch (because it's also a database)?
  2. If the answer for the first item is yes, so, when we perform a query that will traversal the graph, the JanusGraph will understand and perform the query on Cassandra and when this is a full text search then JanusGraph switch the query to ElasticSearch ?
  3. If the answer for the first item is no, so, all the data will be stored on Cassandra and in some way JanusGraph will just use the index from ElasticSearch to do a search on Cassandra database ?

Upvotes: 6

Views: 575

Answers (1)

Erick Ramirez
Erick Ramirez

Reputation: 16303

ElasticSearch indexes the data stored in Cassandra.

When you do graph traversals, it uses the search index to retrieve the data from Cassandra. Cheers!

Upvotes: 1

Related Questions