NRediSearch icon indicating copy to clipboard operation
NRediSearch copied to clipboard

GetInfoParsedAsync returns Null for Fields

Open Kyle1177 opened this issue 2 years ago • 1 comments

In our application, we have used the GetInfoParsedAsync method to retrieve all the field names for a specific index. A few weeks ago I noticed that the 'Fields' within the InfoResult object is now returning as Null: image

Was this intended? It is still possible to find what we need, but it requires digging deep into the provided array of Attributes to pull it out.

Kyle1177 avatar May 15 '23 19:05 Kyle1177

@Kyle1177, I recommend you to use NRedisStack, A maintained client that supports all RediSearch commands (and all other RedisStack commands), in an easy and simple way to use.

this is an example to get the InfoResult in NRedisStack:

var redis = ConnectionMultiplexer.Connect("localhost");|
var db = redis.GetDatabase();
var ft = db.FT();

// ... Code ...

InfoResult info = ft.Info(<index>);

more examples: Basic Query Operations HSET and Search Advanced Querying Convert SearchResult To Json

If you have any further questions about using NRedisStack, feel free to contact me 😄

shacharPash avatar Jun 07 '23 12:06 shacharPash