You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like IsIndexCurrentAsync always returns false when I try the new feature. In this example the code hits the lines with DropIndexAsync and CreateIndexAsync for every run. I first run the sample and the index is created. Then I do another run and IsIndexCurrentAsync return false when there is no changes in the model (an the index exists from previous run).
using Redis.OM;
using Redis.OM.Modeling;
var provider = new RedisConnectionProvider("redis://localhost:6379");
var isIndexCurrentAsync = await provider.Connection.IsIndexCurrentAsync(typeof(Customer));
if (!await provider.Connection.IsIndexCurrentAsync(typeof(Customer)))
{
await provider.Connection.DropIndexAsync(typeof(Customer));
await provider.Connection.CreateIndexAsync(typeof(Customer));
}
[Document(StorageType = StorageType.Json, Prefixes = new[] { "test" })]
public class Customer
{
[Indexed] public string FirstName { get; set; }
[Indexed] public string LastName { get; set; }
public string Email { get; set; }
[Indexed(Sortable = true)] public int Age { get; set; }
[Indexed] public string[] NickNames { get; set; }
}
Versions:
Redis OM v. 0.7.5
RediSearch v. 2.8.13
RedisJson v. 2.6.10
The text was updated successfully, but these errors were encountered:
Hi,
It seems like
IsIndexCurrentAsync
always returns false when I try the new feature. In this example the code hits the lines with DropIndexAsync and CreateIndexAsync for every run. I first run the sample and the index is created. Then I do another run and IsIndexCurrentAsync return false when there is no changes in the model (an the index exists from previous run).Versions:
Redis OM v. 0.7.5
RediSearch v. 2.8.13
RedisJson v. 2.6.10
The text was updated successfully, but these errors were encountered: