> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/manage-data/reindex-the-entire-database.md).

# Reindex the Entire Database

In some cases, you might need to reindex the entire database, if you encounter incorrect or partial data in Cortex XSOAR. Reindexing processes all data in the database and ensures it is fully available for searches in the Cortex XSOAR UI. If issues are only appearing related to a specific index (the indicators from December, for example), you can instead [Reindex a Specific Index Database](/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/manage-data/reindex-a-specific-index-database.md). Depending on the volume of the data in the system, it may take some time for the indexing to complete. We recommend consulting with Cortex XSOAR support before reindexing.

By default, indexing HTML, markdown, and long text fields, are set to 30,000 characters. If large fields are detected, only the first 30,000 characters are searchable. You can change this by adding the `server.text.max.characters` server configuration and adding the amount of characters as required.

Increasing the amount of characters can decrease performance. Reducing the amount of characters, limits disk space consumption and increases performance.

{% hint style="warning" %}

### Caution

* If using Live Backup, the database must be reindexed on both the production and backup servers.
* By default, audits are not reindexed. For more information, see [Reindex the Audit Log](/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/manage-data/reindex-the-audit-log.md).
* After reindexing, all of your data should appear, such as incidents, playbooks, and automations. If there is data missing, follow the procedure in [Reindex a Specific Index Database](/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/manage-data/reindex-a-specific-index-database.md). If the problem persists, contact the Cortex XSOAR support team.
  {% endhint %}

1. Stop the Cortex XSOAR service.

   `sudo service demisto stop`
2. Back up the index directory (`/var/lib/demisto/data/demistoidx`).

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Note</h3><p>The backup of the index directory should not be stored under <code>/var/lib/demisto</code>.</p></div>
3. Delete the index folder using the following command.

   `sudo rm -rf /var/lib/demisto/data/demistoidx`
4. Start the Cortex XSOAR service.

   `sudo service demisto start`
5. Log in to your Cortex XSOAR instance and verify that the reindex process was successful.


---

# 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 dynamically by asking a question.

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

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.12/configure-cortex-xsoar/customize-and-configure-cortex-xsoar/manage-data/reindex-the-entire-database.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
