# Redis 7.2

```json metadata
{
  "schema_version": 2,
  "title": "Redis 7.2",
  "description": "What's new in Redis 7.2",
  "categories": ["docs","operate","rs","rcw"],
  "tableOfContents": {"sections":[{"children":[{"id":"geospatial-queries-with-polygon-search","title":"Geospatial queries with polygon search"},{"id":"streamlined-data-manipulation-in-json","title":"Streamlined data manipulation in JSON"}],"id":"new-features","title":"New features"},{"children":[{"id":"existing-data-structures","title":"Existing data structures"},{"id":"redis-search-improvements","title":"Redis Search improvements"},{"id":"script-execution-enhancemets","title":"Script execution enhancemets"},{"id":"client-and-replication-enhancements","title":"Client and replication enhancements"}],"id":"improvements","title":"Improvements"},{"children":[{"id":"breaking-changes","title":"Breaking changes"},{"id":"expired-keys-are-now-deleted-from-replica-indexes","title":"Expired keys are now deleted from replica indexes"},{"id":"other-changes","title":"Other changes"}],"id":"changes","title":"Changes"},{"id":"component-versions","title":"Component versions"}]}

,
  "codeExamples": []
}
```


Redis version 7.2 introduces new capabilities, including improved geospatial queries, and streamlined JSON data manipulation. Performance optimizations, client-side enhancements, and behavioral refinements further improve the efficiency, security, and usability of Redis.
Below is a detailed breakdown of these updates.

## New features

### Geospatial queries with polygon search
Redis Search now supports querying geospatial data using polygon search, enabling developers to efficiently filter and retrieve data within complex geographic boundaries.

### Streamlined data manipulation in JSON
JSON now includes two new commands for improved data handling:

- `JSON.MERGE`: Merges a given JSON value into matching paths, allowing more flexible updates.
- `JSON.MSET`: Sets or updates multiple JSON values simultaneously based on specified key-path-value triplets, improving efficiency when handling structured data.

## Improvements

### Existing data structures
Significant performance improvements have been made across Redis data types. Sorted sets, commonly used for gaming leaderboards, now see performance improvements ranging from [30% to 100%](https://redis.io/blog/introducing-redis-7-2/).

Additionally, Redis stream consumer tracking has been enhanced to provide better visibility into consumer activity, and blocked stream commands now return a distinct error when the target key no longer exists.

### Redis Search improvements
Redis Search has received several updates, including optimized `SORT BY` operations and the addition of a new `FORMAT` response in RESP3, improving both efficiency and readability.

### Script execution enhancemets
Client-side tracking now monitors actual keys read during script execution, improving key usage tracking accuracy. Additionally, blocked commands will re-evaluate security checks before execution, ensuring compliance with updated permissions. Standardized ACL failure messages and error codes now provide clearer error handling.

### Client and replication enhancements
TLS-based replication now supports Server Name Indication (SNI) to improve compatibility with secure deployments. The `HELLO` command behavior has also been refined to modify client state only upon successful execution, ensuring more predictable client behavior.

## Changes

### Breaking changes
Redis 7.2 introduces several backward-incompatible changes. Lua scripts no longer support the `print()` function, blocking of `PFCOUNT` and `PUBLISH` in read-only scripts, and time sampling freezing during command execution. Error handling updates include case changes in error responses, new behavior for `ZPOPMIN/ZPOPMAX` with `count 0`, and adjustments to `XCLAIM/XAUTOCLAIM`. ACL changes affect command categorization and key access permissions, while command introspection now includes per-subcommand statistics. Redis now allows certain `CONFIG` commands during loading and tracks statistics only when commands are executed.

### Expired keys are now deleted from replica indexes
Expired keys are now deleted from Redis Search replica indexes, ensuring that queries return an empty array rather than `nil` when the data no longer exists.

### Other changes
Redis Stack 7.2 no longer includes Graph capabilities. For more details, refer to the [RedisGraph End-of-Life Announcement](https://redis.io/blog/redisgraph-eol/).

## Component versions
The Redis version 7.2 includes the following components:

- [Redis 7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES)
- [Search 2.8](https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.8-release-notes/)
- [JSON 2.6](https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisjson/redisjson-2.6-release-notes/)
- [Time series 1.10](https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redistimeseries/redistimeseries-1.10-release-notes/)
- [Bloom 2.6](https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/release-notes/redisbloom/redisbloom-2.6-release-notes/)

