FT.CREATE improvements by nkaradzhov · Pull Request #3157 · redis/node-redis
…nt configurations
Allow RediSearchSchema to accept an array of field definitions for a single field,
enabling the same field to be indexed with different types and aliases.
Example:
```typescript
{
sku: [
{ type: SCHEMA_FIELD_TYPE.TEXT, AS: 'sku_text' },
{ type: SCHEMA_FIELD_TYPE.TAG, AS: 'sku_tag', SORTABLE: true }
]
}
```
- Add SchemaFieldDefinition type for reusable field type union
- Update RediSearchSchema to accept SchemaFieldDefinition | SchemaFieldDefinition[]
- Update parseSchema to normalize input and iterate over field definition arrays
---
- fix typo in PT SCHEMA_TEXT_FIELD_PHONETIC
- Add JSDoc and README documentation for the new array syntax that allows
indexing the same field multiple times with different types or aliases.