Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions redis/search/schema-definition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ You can define fields at arbitrary nesting levels using the `.` character as a s

Aliased fields allow you to index the same document field multiple times with different settings,
or to create shorter names for complex nested paths.
Use the `AS` keyword to specify which document field the alias points to.
Use the `FROM` keyword to specify which document field the alias points to.

<Tabs>

Expand Down Expand Up @@ -265,7 +265,7 @@ const products = await redis.search.createIndex({
```bash
# Index 'description' twice with different settings
# Create a short alias for a deeply nested field
SEARCH.CREATE products ON JSON PREFIX 1 product: SCHEMA description TEXT descriptionExact TEXT FROM description NOSTEM authorName TEXT AS metadata.author.displayName
SEARCH.CREATE products ON JSON PREFIX 1 product: SCHEMA description TEXT descriptionExact TEXT FROM description NOSTEM authorName TEXT FROM metadata.author.displayName
```
</Tab>

Expand Down