---
title: "Disable Index"
url: "https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/disable-index"
version: "6.2"
language: "java"
---

# Disable Index

> Client language: Java. Also available for [C#](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/disable-index.md), [Python](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/disable-index.python.md), [PHP](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/disable-index.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/disable-index.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

The **DisableIndexOperation** is used to turn the indexing off for a given index. Querying a `disabled` index is allowed, but it may return stale results.

> **Note**
>
> Unlike [StopIndex](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/stop-index.java.md) or [StopIndexing](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/stop-indexing.java.md) disable index is a persistent operation, so the index remains disabled even after a server restart.

## Syntax

```java
public DisableIndexOperation(String indexName)
```

| Parameters | | |
| - | - | - |
| **indexName** | String | name of an index to disable indexing |

## Example

```java
store.maintenance().send(new DisableIndexOperation("Orders/Totals"));
// index is disabled at this point, new data won't be indexed
// but you can still query on this index
```

## See also

- [What are Indexes](https://docs.ravendb.net/6.2/indexes/what-are-indexes.java.md)
- [Creating and Deploying Indexes](https://docs.ravendb.net/6.2/indexes/creating-and-deploying.java.md)
- [Index Administration](https://docs.ravendb.net/6.2/indexes/index-administration.md)
- [Enable Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/enable-index.java.md)
- [What are operations](https://docs.ravendb.net/6.2/client-api/operations/what-are-operations.java.md)
- [How to Pause Index Until Restart](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/stop-index.java.md)
