---
title: "Index has Changed Operation"
url: "https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/index-has-changed"
version: "6.2"
language: "java"
---

# Index has Changed Operation

> Client language: Java. Also available for [C#](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/index-has-changed.md), [Python](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/index-has-changed.python.md), [PHP](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/index-has-changed.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/index-has-changed.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."

**IndexHasChangedOperation** will let you check if the given index definition differs from the one on a server. This might be useful when you want to check the prior index deployment, if the index will be overwritten, and if indexing data will be lost.

## Syntax

```java
public IndexHasChangedOperation(IndexDefinition definition)
```

| Parameters | | |
| - | - | - |
| **indexDef** | `IndexDefinition` | index definition |

| Return Value | |
| - | - |
| true | if an index **does not exist** on a server |
| true | if an index definition **does not match** the one from the **indexDef** parameter |
| false | if there are no differences between an index definition on the server and the one from the **indexDef** parameter |

## Example

```java
Boolean ordersIndexHasChanged =
  store.maintenance().send(new IndexHasChangedOperation(ordersIndexDefinition));
```

## 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)
- [How to Get Indexes](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-indexes.java.md)
- [How to Put Indexes](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/put-indexes.java.md)
- [How to Delete Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index.java.md)
