Class RediSearchCommands
extension methods for redisearch.
Inheritance
Inherited Members
Namespace: Redis.OM
Assembly: Redis.OM.dll
Syntax
public static class RediSearchCommands
Methods
| Improve this Doc View SourceCreateIndex(IRedisConnection, Type)
Creates an index.
Declaration
public static bool CreateIndex(this IRedisConnection connection, Type type)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection. |
System.Type | type | the type to use for creating the index. |
Returns
Type | Description |
---|---|
System.Boolean | whether the index was created or not. |
CreateIndexAsync(IRedisConnection, Type)
Creates an index.
Declaration
public static async Task<bool> CreateIndexAsync(this IRedisConnection connection, Type type)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection. |
System.Type | type | the type to use for creating the index. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | whether the index was created or not. |
DropIndex(IRedisConnection, Type)
Deletes an index.
Declaration
public static bool DropIndex(this IRedisConnection connection, Type type)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection. |
System.Type | type | the type to drop the index for. |
Returns
Type | Description |
---|---|
System.Boolean | whether the index was dropped or not. |
DropIndexAndAssociatedRecords(IRedisConnection, Type)
Deletes an index. And drops associated records.
Declaration
public static bool DropIndexAndAssociatedRecords(this IRedisConnection connection, Type type)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection. |
System.Type | type | the type to drop the index for. |
Returns
Type | Description |
---|---|
System.Boolean | whether the index was dropped or not. |
DropIndexAsync(IRedisConnection, Type)
Deletes an index.
Declaration
public static async Task<bool> DropIndexAsync(this IRedisConnection connection, Type type)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection. |
System.Type | type | the type to drop the index for. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | whether the index was dropped or not. |
Search<T>(IRedisConnection, RedisQuery)
Search redis with the given query.
Declaration
public static SearchResponse<T> Search<T>(this IRedisConnection connection, RedisQuery query)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection to redis. |
RedisQuery | query | the query to use in the search. |
Returns
Type | Description |
---|---|
SearchResponse<T> | A typed search response. |
Type Parameters
Name | Description |
---|---|
T | the type. |
SearchAsync<T>(IRedisConnection, RedisQuery)
Search redis with the given query.
Declaration
public static async Task<SearchResponse<T>> SearchAsync<T>(this IRedisConnection connection, RedisQuery query)
Parameters
Type | Name | Description |
---|---|---|
IRedisConnection | connection | the connection to redis. |
RedisQuery | query | the query to use in the search. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SearchResponse<T>> | A typed search response. |
Type Parameters
Name | Description |
---|---|
T | the type. |