NRediSearch icon indicating copy to clipboard operation
NRediSearch copied to clipboard

Alias to an index

Open icyice80 opened this issue 1 year ago • 1 comments

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

icyice80 avatar Jul 21 '23 04:07 icyice80

@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

shacharPash avatar Jan 02 '24 13:01 shacharPash