Skip to content

Commit 7c29e73

Browse files
authored
Merge pull request #5152 from haileytap/image-search
[Azure Search] Add image search to search-explorer.md
2 parents 8280b8b + da1f7bb commit 7c29e73

File tree

2 files changed

+45
-34
lines changed

2 files changed

+45
-34
lines changed
72.2 KB
Loading

articles/search/search-explorer.md

Lines changed: 45 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: haileytap
77
ms.author: haileytapia
88
ms.service: azure-ai-search
99
ms.topic: quickstart
10-
ms.date: 03/04/2025
10+
ms.date: 05/22/2025
1111
ms.custom:
1212
- mode-ui
1313
---
@@ -18,9 +18,6 @@ In this quickstart, you learn how to use **Search explorer**, a built-in query t
1818

1919
This quickstart uses an existing index to demonstrate Search explorer.
2020

21-
> [!TIP]
22-
> Search explorer now supports image search. To learn more, see [Quickstart: Image search in the Azure portal](search-get-started-portal-image-search.md).
23-
2421
## Prerequisites
2522

2623
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/).
@@ -29,40 +26,54 @@ This quickstart uses an existing index to demonstrate Search explorer.
2926

3027
+ This quickstart uses the realestate-us-sample index. To create the index, run the [**Import data wizard**](search-import-data-portal.md), select the built-in sample data, and step through the wizard using all the default values.
3128

32-
:::image type="content" source="media/search-explorer/search-explorer-sample-data.png" alt-text="Screenshot of the sample data sets available in the Import data wizard." border="true":::
29+
:::image type="content" source="media/search-explorer/search-explorer-sample-data.png" alt-text="Screenshot of the sample data sets available in the Import data wizard." border="true" lightbox="media/search-explorer/search-explorer-sample-data.png":::
3330

3431
## Start Search explorer
3532

36-
1. In the [Azure portal](https://portal.azure.com), open the search overview page from the dashboard or [find your service](https://portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices).
33+
1. In the [Azure portal](https://portal.azure.com), find your search service and open the **Overview** page.
3734

38-
1. Open Search explorer from the command bar:
35+
1. On the command bar, select **Search explorer**:
3936

4037
:::image type="content" source="media/search-explorer/search-explorer-cmd2.png" alt-text="Screenshot of the Search explorer command in portal." border="true":::
4138

42-
Or use the embedded **Search explorer** tab on an open index:
39+
Alternatively, select the **Search explorer** tab on an open index.
40+
41+
:::image type="content" source="media/search-explorer/search-explorer-tab.png" alt-text="Screenshot of the Search explorer tab." border="true" lightbox="media/search-explorer/search-explorer-tab.png":::
4342

44-
:::image type="content" source="media/search-explorer/search-explorer-tab.png" alt-text="Screenshot of the Search explorer tab." border="true":::
43+
## Query three ways
4544

46-
## Query two ways
45+
There are three approaches to querying in Search explorer:
4746

48-
There are two approaches for querying in Search explorer.
47+
+ Query view provides a default search bar. It accepts an empty query or free-text query with Booleans, such as `seattle condo + parking`.
4948

50-
+ Query view provides a default search bar. It accepts an empty query or free text query with booleans. For example, `seattle condo +parking`.
49+
+ Image view provides a window to browse or drag and drop PNG, JPG, or JPEG files. Unless your index has an [image vectorizer and an equivalent skill](vector-search-how-to-configure-vectorizer.md#supported-embedding-models), this view is unavailable.
5150

5251
+ JSON view supports parameterized queries. Filters, orderby, select, count, searchFields, and all other parameters must be set in JSON view.
5352

54-
> [!TIP]
55-
> JSON view provides intellisense for parameter name completion. Place your cursor inside the JSON view and type a space character to see a list of all query parameters. You can also type a letter, like "s," to see only the query parameters that begin with that letter. Intellisense doesn't exclude invalid parameters, so use your best judgment.
53+
:::image type="content" source="media/search-explorer/three-query-views.png" alt-text="Screenshot of the three views for querying in Search explorer." border="true" lightbox="media/search-explorer/three-query-views.png":::
54+
55+
## Example: Image query
56+
57+
Search explorer accepts images as query inputs through **Image view**, which requires that you use a supported vectorizer–skill pair. For more information, see [Configure a vectorizer in a search index](vector-search-how-to-configure-vectorizer.md).
58+
59+
The realestate-us-sample index isn't configured for image vectorization. If you want to run image queries, create an index as described in [Quickstart: Vector search in the Azure portal](search-get-started-portal-import-vectors.md). The quickstart relies on text-based sample data, so you must use documents that contain images.
5660

57-
Switch to **JSON view** for parameterized queries. The examples in this article assume JSON view throughout. You can paste JSON examples from this article into the text area.
61+
To run an image query, select or drag an image to the search area, and then select **Search**. Search explorer vectorizes the image and sends the vector to the search engine for query execution. The search engine returns documents that are sufficiently similar to the input image, up to the specified `k` number of results. <!-- This is enabled by [vector search](vector-search-overview.md), which matches documents based on the similarity of their vector representations. -->
5862

59-
:::image type="content" source="media/search-explorer/search-explorer-json-view.png" alt-text="Screenshot of the JSON view selector." border="true":::
63+
:::image type="content" source="media/search-get-started-portal-images/image-search.png" alt-text="Screenshot of search results for image search." border="true" lightbox="media/search-get-started-portal-images/image-search.png":::
6064

61-
## Run an unspecified query
65+
## Examples: JSON queries
66+
67+
The following are examples of JSON queries you can run using Search explorer. To follow these examples, switch to **JSON view**. You can paste each JSON example into the text area.
68+
69+
> [!TIP]
70+
> The JSON view provides intellisense for parameter name completion. Place your cursor inside the JSON view and type a space character to see all query parameters. You can also type a letter, like "s," to see only the query parameters that begin with that letter. Intellisense doesn't exclude invalid parameters, so use your best judgment.
71+
72+
### Run an unspecified query
6273

6374
In Search explorer, POST requests are formulated internally using the [Search POST REST API](/rest/api/searchservice/documents/search-post?view=rest-searchservice-2024-05-01-preview&preserve-view=true), with responses returned as verbose JSON documents.
6475

65-
For a first look at content, execute an empty search by clicking **Search** with no terms provided. An empty search is useful as a first query because it returns entire documents so that you can review document composition. On an empty search, there's no search score and documents are returned in arbitrary order (`"@search.score": 1` for all documents). By default, 50 documents are returned in a search request.
76+
For a first look at content, execute an empty search by selecting **Search** with no terms provided. An empty search is useful as a first query because it returns entire documents so that you can review document composition. On an empty search, there's no search score and documents are returned in arbitrary order (`"@search.score": 1` for all documents). By default, 50 documents are returned in a search request.
6677

6778
Equivalent syntax for an empty search is `*` or `"search": "*"`.
6879

@@ -75,11 +86,11 @@ Equivalent syntax for an empty search is `*` or `"search": "*"`.
7586

7687
**Results**
7788

78-
:::image type="content" source="media/search-explorer/search-explorer-example-empty.png" alt-text="Unqualified or empty query example" border="true":::
89+
:::image type="content" source="media/search-explorer/search-explorer-example-empty.png" alt-text="Screenshot of unqualified or empty query example." border="true" lightbox="media/search-explorer/search-explorer-example-empty.png":::
7990

80-
## Free text search
91+
### Run a free-text query
8192

82-
Free-form queries, with or without operators, are useful for simulating user-defined queries sent from a custom app to Azure AI Search. Only those fields attributed as "searchable" in the index definition are scanned for matches.
93+
Free-form search, with or without operators, is useful for simulating user-defined queries sent from a custom app to Azure AI Search. Only those fields attributed as "searchable" in the index definition are scanned for matches.
8394

8495
You don't need JSON view for a free text query, but we provide it in JSON for consistency with other examples in this article.
8596

@@ -95,9 +106,9 @@ Notice that when you provide search criteria, such as query terms or expressions
95106

96107
You can use Ctrl-F to search within results for specific terms of interest.
97108

98-
:::image type="content" source="media/search-explorer/search-explorer-example-freetext.png" alt-text="Screenshot of a free text query example." border="true":::
109+
:::image type="content" source="media/search-explorer/search-explorer-example-freetext.png" alt-text="Screenshot of a free text query example." border="true" lightbox="media/search-explorer/search-explorer-example-freetext.png":::
99110

100-
## Count of matching documents
111+
### Count matching documents
101112

102113
Add `"count": true` to get the number of matches found in an index. On an empty search, count is the total number of documents in the index. On a qualified search, it's the number of documents matching the query input. Recall that the service returns the top 50 matches by default, so the count might indicate more matches in the index than what's returned in the results.
103114

@@ -110,9 +121,9 @@ Add `"count": true` to get the number of matches found in an index. On an empty
110121

111122
**Results**
112123

113-
:::image type="content" source="media/search-explorer/search-explorer-example-count.png" alt-text="Screenshot of a count example." border="true":::
124+
:::image type="content" source="media/search-explorer/search-explorer-example-count.png" alt-text="Screenshot of a count example." border="true" lightbox="media/search-explorer/search-explorer-example-count.png":::
114125

115-
## Limit fields in search results
126+
### Limit fields in search results
116127

117128
Add ["select"`](search-query-odata-select.md) to limit results to the explicitly named fields for more readable output in **Search explorer**. Only fields marked as "retrievable" in the search index can show up in results.
118129

@@ -126,11 +137,11 @@ Add ["select"`](search-query-odata-select.md) to limit results to the explicitly
126137

127138
**Results**
128139

129-
:::image type="content" source="media/search-explorer/search-explorer-example-selectfield.png" alt-text="Screenshot of restrict fields in search results example." border="true":::
140+
:::image type="content" source="media/search-explorer/search-explorer-example-selectfield.png" alt-text="Screenshot of restrict fields in search results example." border="true" lightbox="media/search-explorer/search-explorer-example-selectfield.png":::
130141

131-
## Return next batch of results
142+
### Return next batch of results
132143

133-
Azure AI Search returns the top 50 matches based on the search rank. To get the next set of matching documents, append `"top": 100` and `"skip": 50` to increase the result set to 100 documents (default is 50, maximum is 1000), skipping the first 50 documents. You can check the document key (listingID) to identify a document.
144+
Azure AI Search returns the top 50 matches based on the search rank. To get the next set of matching documents, append `"top": 100` and `"skip": 50` to increase the result set to 100 documents (default is 50, maximum is 1000), skipping the first 50 documents. You can check the document key (listingID) to identify a document.
134145

135146
Recall that you need to provide search criteria, such as a query term or expression, to get ranked results. Notice that search scores decrease the deeper you reach into search results.
136147

@@ -146,9 +157,9 @@ Recall that you need to provide search criteria, such as a query term or express
146157

147158
**Results**
148159

149-
:::image type="content" source="media/search-explorer/search-explorer-example-topskip.png" alt-text="Screenshot of returning next batch of search results example." border="true":::
160+
:::image type="content" source="media/search-explorer/search-explorer-example-topskip.png" alt-text="Screenshot of returning next batch of search results example." border="true" lightbox="media/search-explorer/search-explorer-example-topskip.png":::
150161

151-
## Filter expressions (greater than, less than, equal to)
162+
### Filter expressions (greater than, less than, equal to)
152163

153164
Use the [`filter`](search-query-odata-filter.md) parameter to specify inclusion or exclusion criteria. The field must be attributed as "filterable" in the index. This example searches for bedrooms greater than 3:
154165

@@ -163,9 +174,9 @@ Use the [`filter`](search-query-odata-filter.md) parameter to specify inclusion
163174

164175
**Results**
165176

166-
:::image type="content" source="media/search-explorer/search-explorer-example-filter.png" alt-text="Screenshot of a filter example." border="true":::
177+
:::image type="content" source="media/search-explorer/search-explorer-example-filter.png" alt-text="Screenshot of a filter example." border="true" lightbox="media/search-explorer/search-explorer-example-filter.png":::
167178

168-
## Sorting results
179+
### Sort results
169180

170181
Add [`orderby`](search-query-odata-orderby.md) to sort results by another field besides search score. The field must be attributed as "sortable" in the index. In situations where the filtered value is identical (for example, same price), the order is arbitrary, but you can add more criteria for deeper sorting. An example expression you can use to test this out is:
171182

@@ -178,10 +189,10 @@ Add [`orderby`](search-query-odata-orderby.md) to sort results by another field
178189
"orderby": "price asc"
179190
}
180191
```
181-
192+
182193
**Results**
183194

184-
:::image type="content" source="media/search-explorer/search-explorer-example-orderby.png" alt-text="Screenshot of a sorting example." border="true":::
195+
:::image type="content" source="media/search-explorer/search-explorer-example-orderby.png" alt-text="Screenshot of a sorting example." border="true" lightbox="media/search-explorer/search-explorer-example-orderby.png":::
185196

186197
## Takeaways
187198

0 commit comments

Comments
 (0)