StackExchange / NRediSearch

Other
31 stars 9 forks source link

Alias to an index #33

Open icyice80 opened 1 year ago

icyice80 commented 1 year ago

Hi

I cant find any code related to FT.ALIASADD/DEL/UPDATE. Here is my use case: a. create an index with some data b. expose the index out for other apps to use it c. have a nightly job to rebuild the index as we need to refresh the data d. during the rebuild process, the index is not accessible by other apps, we would like to use index alias to solve this problem.

Does it mean that I need to issue a raw command in this case like FT.ALIASUPDATE?

Thanks

shacharPash commented 10 months ago

@icyice80 , I recommend you to use NRedisStack.

NRedisStack is an official Redis library (based on StackExchange.Redis) that provides support for Redis Stack commands. The FT.ALIASADD/DEL/UPDATE commands are implemented in the library as part of the Search module.

Here is an example from the tests of using the commands you mentioned

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