> For the complete documentation index, see [llms.txt](https://ed.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ed.sunbird.org/older-versions/development-resources/misc-pages/content-indexing-flow.md).

# Content Indexing Flow

How does content get indexed in Elastic Search

1. Content create, update, publish, retire etc APIs are called and content is updated in Neo4j
2. Neo4j writes these updates to a log file, typically located at `/data/logs/learning_graph_event_neo4j.log`. This file needs to have the right permissions i.e. it needs to be owned by the user neo4j is running as. Usually this is `learning`
3. The logstash service picks up lines from this log and pushes as events into the [dev.learning.graph.events](http://dev.learning.graph.events) topic
4. The search indexer service picks up events from above topic and creates/updates the records in ES
5. The search indexer config affects how the data is inserted
   1. nested.fields affects how certain fields are mapped
   2. restrict.objectTypes - Any records with these object types is not inserted into ES
6. This applies to all the object types stored in Neo4J - Content, Collection, Question, QuestionSet, License, Framework, Channel


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ed.sunbird.org/older-versions/development-resources/misc-pages/content-indexing-flow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
