public async Task <IEnumerable <SearchResult <TEntity> > > SearchAsync <TEntity>(Query <TEntity> query) where TEntity : RedisearchSerializable <TEntity>, new() { var database = _redisConnection.GetDatabase(); var searchCommand = SearchCommand.Create(query); return(await searchCommand.ExecuteAsync <TEntity>(database, _serializer).ConfigureAwait(false)); }
private static CommandLineBuilder BuildCommandLine() { var root = new RootCommand(); root.AddCommand(IndexCommand.Create()); root.AddCommand(SearchCommand.Create()); return(new CommandLineBuilder(root)); }
public IEnumerable <SearchResult <TEntity> > Search <TEntity>(Query <TEntity> query) where TEntity : RedisearchSerializable <TEntity>, new() { var database = _redisConnection.GetDatabase(); var searchCommand = SearchCommand.Create(query); return(searchCommand.Execute <TEntity>(database, _serializer)); }