Skip to content

Commit 2083d22

Browse files
Merge pull request #235335 from gmndrg/main
Reflect regex complex queries affecting performance
2 parents e979fce + 862df2a commit 2083d22

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

articles/search/search-performance-tips.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: LiamCavanagh
77
ms.author: liamca
88
ms.service: cognitive-search
99
ms.topic: conceptual
10-
ms.date: 08/25/2022
10+
ms.date: 04/20/2023
1111
---
1212

1313
# Tips for better performance in Azure Cognitive Search
@@ -132,6 +132,11 @@ As this hypothetical scenario illustrates, you can have configurations on lower
132132

133133
An important benefit of added memory is that more of the index can be cached, resulting in lower search latency, and a greater number of queries per second. With this extra power, the administrator may not need to even need to increase the replica count and could potentially pay less than by staying on the S1 service.
134134

135+
### Tip: Consider alternatives to regular expression queries
136+
137+
[Regular expression queries](query-lucene-syntax.md#bkmk_regex) or regex can be particularly expensive. While they can be very useful for complex searches, they also may require a lot of processing power to be executed, especially if the regular expression has a lot of complexity or when searching through a large amount of data. This would result in high search latency. In order to reduce the search latency, try to simplify the regular expression or break the complex query down into smaller, more manageable queries.
138+
139+
135140
## Next steps
136141

137142
Review these other articles related to service performance:

articles/search/search-query-fuzzy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: how-to
11-
ms.date: 06/22/2022
11+
ms.date: 04/20/2023
1212
---
1313
# Fuzzy search to correct misspellings and typos
1414

@@ -26,7 +26,7 @@ A match succeeds if the discrepancies are limited to two or fewer edits, where a
2626

2727
In Azure Cognitive Search:
2828

29-
+ Fuzzy query applies to whole terms, but you can support phrases through AND constructions. For example, "Unviersty~ of~ "Wshington~" would match on "University of Washington".
29+
+ Fuzzy query applies to whole terms. Phrases aren't supported directly but you can specify a fuzzy match on each term of a multi-part phrase through AND constructions. For example, `search=dr~ AND cleanin~`. This query expression finds matches on "dry cleaning".
3030

3131
+ The default distance of an edit is 2. A value of `~0` signifies no expansion (only the exact term is considered a match), but you could specify `~1` for one degree of difference, or one edit.
3232

@@ -143,4 +143,4 @@ The point of this expanded example is to illustrate the clarity that hit highlig
143143
+ [How full text search works in Azure Cognitive Search (query parsing architecture)](search-lucene-query-architecture.md)
144144
+ [Search explorer](search-explorer.md)
145145
+ [How to query in .NET](./search-get-started-dotnet.md)
146-
+ [How to query in REST](./search-get-started-powershell.md)
146+
+ [How to query in REST](./search-get-started-powershell.md)

0 commit comments

Comments
 (0)