Skip to content

Commit dac4774

Browse files
authored
fixing #333 doc ambiguity around migrations (#366)
1 parent 70bce7c commit dac4774

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

docs/README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,8 @@ public partial class Person
265265

266266
### Creating Indices
267267

268-
With the Index defined, the next step is to create the index. There are two methods in `IRedisConnection` we can use,
268+
With the Index defined, the next step is to create the index. To do so use `IRedisConnection.CreateIndex(Type type)`. `CreateIndex` will create the index described by the `Type` parameter (which will be disassembled and serialized into a redis index) if and only if the Index does not already exist in Redis.
269269

270-
1. `IRedisConnection.CreateIndex(Type type)`
271-
2. `IRedisConnection.MigrateIndex(Type type)`
272-
273-
`CreateIndex` will create the index described by the `Type` parameter (which will be disassembled and serialized into a redis index) if and only if the Index does not already exist in Redis. `MigrateIndex`, on the other hand, will look at the index already in Redis and add/remove what is needed to bring it into compliance with the prescribed index.
274270

275271
#### Create
276272

@@ -279,13 +275,6 @@ var connection = RedisConnectionProvider.Connection;
279275
connection.CreateIndex(typeof(Person));
280276
```
281277

282-
#### Migrate
283-
284-
```csharp
285-
var connection = RedisConnectionProvider.Connection;
286-
connection.MigrateIndex(typeof(Person));
287-
```
288-
289278
## Querying
290279

291280
Redis Developer Dotnet provides a Fluent API to build queries. The RedisCollection is an extension of `IQueryable` so you can apply typical lambda expressions you'd expect to use elsewhere. Only when you enumerate the collection is the query built and executed against redis.

0 commit comments

Comments
 (0)