Skip to content

Commit 78a9b4a

Browse files
committed
Fix default dialect settings (redis#374)
default dialect setting
1 parent 6f37677 commit 78a9b4a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/NRedisStack/Search/SearchCommands.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public InfoResult Info(RedisValue index) =>
154154
/// <inheritdoc/>
155155
public Tuple<SearchResult, Dictionary<string, RedisResult>> ProfileSearch(string indexName, Query q, bool limited = false)
156156
{
157+
setDefaultDialectIfUnset(q);
157158
return _db.Execute(SearchCommandBuilder.ProfileSearch(indexName, q, limited))
158159
.ToProfileSearchResult(q);
159160
}

src/NRedisStack/Search/SearchCommandsAsync.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,14 @@ public async Task<InfoResult> InfoAsync(RedisValue index) =>
155155
/// <inheritdoc/>
156156
public async Task<Tuple<SearchResult, Dictionary<string, RedisResult>>> ProfileSearchAsync(string indexName, Query q, bool limited = false)
157157
{
158+
setDefaultDialectIfUnset(q);
158159
return (await _db.ExecuteAsync(SearchCommandBuilder.ProfileSearch(indexName, q, limited)))
159160
.ToProfileSearchResult(q);
160161
}
161162
/// <inheritdoc/>
162163
public async Task<Tuple<AggregationResult, Dictionary<string, RedisResult>>> ProfileAggregateAsync(string indexName, AggregationRequest query, bool limited = false)
163164
{
165+
setDefaultDialectIfUnset(query);
164166
return (await _db.ExecuteAsync(SearchCommandBuilder.ProfileAggregate(indexName, query, limited)))
165167
.ToProfileAggregateResult(query);
166168
}

0 commit comments

Comments
 (0)