# What are multiple databases used for

### Content Service

* All schema fields except body is stored in Neo4J
* Body, hierarchy is stored in cassandra
* Redis caches the content ids and hierarchy for use by other services
* Content is indexed to Elastic Search

### Search API

* Search API runs off Elastic Search. More details [here](/misc/misc-pages/content-indexing-flow.md)
* The compositesearch index is used for the search.
* compositesearch is actually just an alias to an actual ES index. This is done so that if the index crashes, a new index can be built, and the alias can be pointed to the new index

### Cassandra Migrations

Cassandra migrations are stored in this repo -<https://github.com/project-sunbird/sunbird-utils>

Folder - sunbird-cassandra-migration/cassandra-migration/src/main/resources/db/migration/cassandra

### Redis

There are two redis instances running. A metadata redis and a knowledge platform redis

1. metadata redis / db12 : user cache used by DP Jobs
2.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ed.sunbird.org/misc/misc-pages/what-are-multiple-databases-used-for.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
