Skip to content

Commit 7f65e1d

Browse files
committed
Apply review comments.
1 parent c407ac3 commit 7f65e1d

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

content/develop/interact/search-and-query/best-practices/dev-to-prod-best-practices.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ RQE offers several configurable parameters that influence query results and perf
2020

2121
### 1. `TIMEOUT`
2222

23-
- Purpose: Limits the duration a query is allowed to execute.
23+
- Purpose: limits the duration a query is allowed to execute.
2424
- Default: 500 milliseconds.
2525
- Behavior:
26+
- Ensures that queries do not monopolize the main Redis thread.
2627
- If a query exceeds the `TIMEOUT` value, its outcome is determined by the `ON_TIMEOUT` setting:
27-
- `FAIL`: The query will return an error.
28-
- `PARTIAL`: Partial results will be returned.
28+
- `FAIL`: the query will return an error.
29+
- `PARTIAL`: this setting will return the top results accumulated by the query until it timed out.
2930
- Recommendations:
30-
- Default behavior: Ensures that queries do not monopolize the main Redis thread.
31-
- Caution: Be mindful when increasing `TIMEOUT`,<!-- especially in environments without QPF,--> as long-running queries can degrade overall system performance.
32-
<!-- - With Query Performance Factor (QPF): If QPF (multi-threaded query execution) is enabled, the risks of increasing this value are mitigated, as queries execute against index memory using multiple threads.-->
31+
- Caution: be mindful when increasing `TIMEOUT`,<!-- especially in environments without QPF,--> as long-running queries can degrade overall system performance.
32+
<!-- - With Query Performance Factor (QPF): if QPF (multi-threaded query execution) is enabled, the risks of increasing this value are mitigated, as queries execute against index memory using multiple threads.-->
3333

3434
### 2. `MINPREFIX`
3535

36-
- Purpose: Sets the minimum number of characters required for wildcard searches.
36+
- Purpose: sets the minimum number of characters required for wildcard searches.
3737
- Default: 2 characters.
3838
- Behavior:
3939
- Queries like `he*` are valid, while `h*` would not meet the threshold.
@@ -45,13 +45,16 @@ RQE offers several configurable parameters that influence query results and perf
4545

4646
- Purpose: Defines the maximum number of expansions for a wildcard query term.
4747
- Default: 200 expansions.
48+
- Behavior:
49+
- Expansions: when a wildcard query term is processed, Redis generates a list of all possible matches from the index that satisfy the wildcard. For example, the query he* might expand to terms like hello, hero, and heat. Each of these matches is an "expansion."
50+
- This parameter limits how many of these expansions Redis will generate and process. If the number of possible matches exceeds the limit, the query may return incomplete results or fail, depending on the query context.
4851
- Recommendations:
4952
- Avoid increasing this parameter excessively, as it can lead to performance bottlenecks during query execution.
5053
- If wildcard searches are common, consider optimizing your index to reduce the reliance on large wildcard expansions.
5154

5255
### 4. `DEFAULT_DIALECT`
5356

54-
- Purpose: Specifies the default query dialect used by [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search) and [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate) commands.
57+
- Purpose: specifies the default query dialect used by [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search) and [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate) commands.
5558
- Default: [Dialect 1]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects" >}}).
5659
- Recommendations:
5760
- Update the default to [**Dialect 4**]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects#dialect-4" >}}) for better performance and access to advanced features.
@@ -60,9 +63,9 @@ RQE offers several configurable parameters that influence query results and perf
6063
## Testing
6164

6265
### 1. Correctness
63-
- Ensure query results align with expected outcomes.
66+
- Run a few test queries and check the results are what you expect.
6467
- Use the following tools to validate and debug:
65-
- Redis CLI: Use [`MONITOR`]({{< baseurl >}}/commands/monitor) or [profiling features]({{< relref "/develop/tools/insight#profiler" >}}) in Redis Insight to analyze commands.
68+
- Redis CLI: use the [`MONITOR`]({{< baseurl >}}/commands/monitor) command or [profiling features]({{< relref "/develop/tools/insight#profiler" >}}) in Redis Insight to analyze commands.
6669
- [`FT.PROFILE`]({{< baseurl >}}/commands/ft.profile): Provides detailed insights into individual query execution paths, helping identify bottlenecks and inefficiencies.
6770

6871
### 2. Performance

0 commit comments

Comments
 (0)