NRediSearch
NRediSearch copied to clipboard
NRediSearch : alias AS feature when creating an index
Hi everyone,
I'm new to Redis and RediSearch. I saw that it was possible to create a schema with NRediSearch, however it doesn't seem possible to add alias (see discussion under this issue).
How can I create the following schema using NRedisSearch :
FT.CREATE idx1 SCHEMA f1 AS f1_text TEXT NOSTEM f1 AS f1_tag TAG
Am I missing something? If not, is it planned to add this feature?
For now I execute the command directly to redis instead of using CreatinIndexAsync() with the schema.
My setup (I'm using this docker image: redislabs/redisearch:2.2.0):
- Redis 6.2.4
- NRediSearch 2.2.62
- RediSearch 2.2.0
Thanks!
Now you can add an alias (after this PR)
Schema sc = new Schema().AddField(new TextField(FieldName.Of("f1").As("f1_text"), noStem: true)).AddTagField(FieldName.Of("f1").As("f1_tag"));
That's great news ! Thank you for the feedback, I need to try this now !