You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/search-query-partial-matching.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ When you need to search on partial strings or special characters, you can overri
23
23
+ Assign the analyzer to the field
24
24
+ Build the index and test
25
25
26
-
This article walks you through each step. The approach described here can be used in other scenarios. In particular, wildcard and regular expression queries also need whole terms as the basis for pattern matching.
26
+
This article walks you through each step. The approach described here can be used in other scenarios. Wildcard and regular expression queries also need whole terms as the basis for pattern matching.
27
27
28
28
## Choosing an analyzer
29
29
@@ -208,19 +208,23 @@ A token filter adds additional processing over existing tokens in your index. Th
208
208
209
209
## Build and test the index
210
210
211
-
Once the index definition with analyzer configuration is done, your next step is to run [Create Index](https://docs.microsoft.com/rest/api/searchservice/create-index) on the service, and then import data. Index names must be unique. If the index already exists, you can either rename the index or delete and recreate it.
211
+
Once the index definition and analyzer configuration work is done, your next step is to run [Create Index](https://docs.microsoft.com/rest/api/searchservice/create-index) on the service, and then import data. Index names must be unique. If the index already exists, you can either rename the index or delete and recreate it.
212
212
213
-
## Query for patterns
213
+
### Advanced query patterns
214
214
215
215
Once you have an index that contains terms in the correct format, you can specify patterns to find matching documents.
216
216
217
217
[Wildcard](search-query-lucene-examples.md#example-7-wildcard-search) and [Regular expression (RegEx)](search-query-lucene-examples.md#example-6-regex) queries are often used to find patterns on content that is expressed as full tokens in an index.
218
218
219
219
1. On the query request, add `querytype=full` to specify the full Lucene query syntax used for wildcard and RegEx queries.
220
220
221
-
2. In the query string:
221
+
```http
222
+
GET https://<SEARCH-SERVICE>.search.windows.net/indexes/<INDEX>/docs?search=*&query-type=true&api-version=2019-05-06
223
+
````
222
224
223
-
+ For wildcard search, embed `*` or `?` wildcard characters
225
+
2. In the `search=` expression:
226
+
227
+
+ For wildcard search, combine text with `*` or `?` wildcard characters
224
228
+ For RegEx queries, enclose your pattern or term with `/`, such as `fieldCode:/SQL*Java-Ext/`
0 commit comments