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-get-started-portal.md
+25-16Lines changed: 25 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,37 +144,46 @@ Moving forward, you should now have a search index that's ready to query using t
144
144
145
145
## Example queries
146
146
147
-
You can enter terms and phrases, similar to what you might do in a Bing or Google search, or fully-specified query expressions. Results are returned as verbose JSON documents.
147
+
All of the queries in this section are designed for **Search Explorer** and the Hotels sample index. Results are returned as verbose JSON documents. All fields marked as "retrievable" in the index can appear in results. For more information about queries, see [Querying in Azure Cognitive Search](search-query-overview.md).
148
148
149
-
### Simple query with top N results
149
+
| Query | Description |
150
+
|-------|-------------|
151
+
|`search=spa`| Simple full text query with top N results. The **`search=`** parameter is used for keyword search, in this case, returning hotel data for those containing *spa* in any searchable field in the document. |
152
+
|`search=beach &$filter=Rating gt 4`| Filtered query. In this case, ratings greater than 4. |
153
+
|`search=spa &$select=HotelName,Description,Tags &$count=true &$top=10`| Parameterized query. The **`&`** symbol is used to append search parameters, which can be specified in any order. </br>**`$select`** parameter returns a subset of fields for more concise search results. </br>**`$count=true`** parameter returns the total count of all documents that match the query. </br>**`$top=10`** returns the highest ranked 10 documents out of the total. By default, Azure Cognitive Search returns the first 50 best matches. You can increase or decrease the amount using this parameter. |
154
+
|`search=* &facet=Category &$top=2`| Facet query, used to return an aggregated count of documents that match a facet value you provide. On an empty or unqualified search, all documents are represented. In the hotels index, the Category field is marked as "facetable". |
155
+
|`search=spa &facet=Rating`| Facet on numeric values. This query is facet for rating, on a text search for "spa". The term "Rating" can be specified as a facet because the field is marked as retrievable, filterable, and facetable in the index, and its numeric values (1 through 5) are suitable for grouping results by each value.|
156
+
|`search=beach &highlight=Description &$select=HotelName, Description, Category, Tags`| Hit highlighting. The term "beach" will be highlighted when it appears in the "Description" field. |
157
+
|`search=seatle` followed by `search=seatle~ &queryType=full`| Fuzzy search. By default, misspelled query terms, like *seatle* for "Seattle", fail to return matches in typical search. The first example returns no results. **`queryType=full`** invokes the full Lucene query parser, which supports the `~` operand for fuzzy search. |
158
+
|`$filter=geo.distance(Location,geography'POINT(-122.12 47.67)') le 5 &search=* &$select=HotelName, Address/City, Address/StateProvince &$count=true`| Geospatial search. The example query filters all results for positional data, where results are less than 5 kilometers from a given point as specified by latitude and longitude coordinates (this example uses Redmond, Washington as the point of origin). |
150
159
151
-
#### Example (string query): `search=spa`
160
+
<!--### Simple query with top N results: `search=spa`
152
161
153
162
+ The **search** parameter is used to input a keyword search for full text search, in this case, returning hotel data for those containing *spa* in any searchable field in the document.
154
163
155
164
+ **Search explorer** returns results in JSON, which is verbose and hard to read if documents have a dense structure. This is intentional; visibility into the entire document is important for development purposes, especially during testing. For a better user experience, you will need to write code that [handles search results](search-pagination-page-layout.md) to bring out important elements.
156
165
157
-
+ Documents are composed of all fields marked as "retrievable" in the index. To view index attributes in the portal, click *hotels-sample* in the **Indexes** list.
166
+
+ Documents are composed of all fields marked as "retrievable" in the index. To view index attributes in the portal, click *hotels-sample* in the **Indexes** list.-->
158
167
159
-
#### Example (parameterized query): `search=spa&$count=true&$top=10`
168
+
<!--#### Example (parameterized query): `search=spa&$count=true&$top=10`
160
169
161
170
+ The **&** symbol is used to append search parameters, which can be specified in any order.
162
171
163
172
+ The **$count=true** parameter returns the total count of all documents returned. This value appears near the top of the search results. You can verify filter queries by monitoring changes reported by **$count=true**. Smaller counts indicate your filter is working.
164
173
165
-
+ The **$top=10** returns the highest ranked 10 documents out of the total. By default, Azure Cognitive Search returns the first 50 best matches. You can increase or decrease the amount via **$top**.
174
+
+ The **$top=10** returns the highest ranked 10 documents out of the total. By default, Azure Cognitive Search returns the first 50 best matches. You can increase or decrease the amount via **$top**.-->
166
175
167
-
### <aname="filter-query"></a> Filter the query
176
+
<!--### <a name="filter-query"></a> Filter the query
168
177
169
178
Filters are included in search requests when you append the **$filter** parameter.
170
179
171
180
#### Example (filtered): `search=beach&$filter=Rating gt 4`
172
181
173
182
+ The **$filter** parameter returns results matching the criteria you provided. In this case, ratings greater than 4.
174
183
175
-
+ Filter syntax is an OData construction. For more information, see [Filter OData syntax](/rest/api/searchservice/odata-expression-syntax-for-azure-search).
184
+
+ Filter syntax is an OData construction. For more information, see [Filter OData syntax](/rest/api/searchservice/odata-expression-syntax-for-azure-search).-->
176
185
177
-
### <aname="facet-query"></a> Facet the query
186
+
<!--### <a name="facet-query"></a> Facet the query
178
187
179
188
Facet filters are included in search requests. You can use the facet parameter to return an aggregated count of documents that match a facet value you provide.
180
189
@@ -191,8 +200,8 @@ Facet filters are included in search requests. You can use the facet parameter t
191
200
192
201
+ Only filterable fields can be faceted. Only retrievable fields can be returned in the results.
193
202
194
-
+ The *Rating* field is double-precision floating point and the grouping will be by precise value. For more information on grouping by interval (for instance, "3 star ratings," "4 star ratings," etc.), see ["Query parameters" in the REST API](/rest/api/searchservice/search-documents#query-parameters).
195
-
203
+
+ The *Rating* field is double-precision floating point and the grouping will be by precise value. For more information on grouping by interval (for instance, "3 star ratings," "4 star ratings," etc.), see ["Query parameters" in the REST API](/rest/api/searchservice/search-documents#query-parameters).-->
Hit highlighting refers to formatting on text matching the keyword, given matches are found in a specific field. If your search term is deeply buried in a description, you can add hit highlighting to make it easier to spot.
@@ -205,9 +214,9 @@ Hit highlighting refers to formatting on text matching the keyword, given matche
205
214
206
215
+ Full text search recognizes basic variations in word forms. In this case, search results contain highlighted text for "beach", for hotels that have that word in their searchable fields, in response to a keyword search on "beaches". Different forms of the same word can appear in results because of linguistic analysis.
207
216
208
-
+ Azure Cognitive Search supports 56 analyzers from both Lucene and Microsoft. The default used by Azure Cognitive Search is the standard Lucene analyzer.
217
+
+ Azure Cognitive Search supports 56 analyzers from both Lucene and Microsoft. The default used by Azure Cognitive Search is the standard Lucene analyzer.-->
By default, misspelled query terms, like *seatle* for "Seattle", fail to return matches in typical search. The following example returns no results.
213
222
@@ -223,15 +232,15 @@ When **queryType** is unspecified, the default simple query parser is used. The
223
232
224
233
Fuzzy search and wildcard search have implications on search output. Linguistic analysis is not performed on these query formats. Before using fuzzy and wildcard search, review [How full text search works in Azure Cognitive Search](search-lucene-query-architecture.md#stage-2-lexical-analysis) and look for the section about exceptions to lexical analysis.
225
234
226
-
For more information about query scenarios enabled by the full query parser, see [Lucene query syntax in Azure Cognitive Search](/rest/api/searchservice/lucene-query-syntax-in-azure-search).
227
-
235
+
For more information about query scenarios enabled by the full query parser, see [Lucene query syntax in Azure Cognitive Search](/rest/api/searchservice/lucene-query-syntax-in-azure-search).-->
Geospatial search is enabled through the [Edm.GeographyPoint data type](/rest/api/searchservice/supported-data-types) on a field containing coordinates. Geospatial search is specified in a filter expression, using [OData geospatial functions](search-query-odata-geo-spatial-functions.md) in Azure Cognitive Search.
231
240
232
241
#### Example (geo-coordinate filters): `$filter=geo.distance(Location,geography'POINT(-122.12 47.67)') le 5&search=*&$select=HotelName, Address/City, Address/StateProvince&$count=true`
233
242
234
-
The example query filters all results for positional data, where results are less than 5 kilometers from a given point as specified by latitude and longitude coordinates (this example uses Redmond, Washington as the locus point). By adding **$count**, you can see how many results are returned when you change either the distance or the coordinates. Adding **$select** returns just those fields that are useful in results.
243
+
The example query filters all results for positional data, where results are less than 5 kilometers from a given point as specified by latitude and longitude coordinates (this example uses Redmond, Washington as the locus point). By adding **$count**, you can see how many results are returned when you change either the distance or the coordinates. Adding **$select** returns just those fields that are useful in results.-->
Copy file name to clipboardExpand all lines: articles/search/search-what-is-azure-search.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,11 +63,11 @@ For more information about specific functionality, see [Features of Azure Cognit
63
63
64
64
An end-to-end exploration of core search features can be achieved in four steps:
65
65
66
-
1.[**Choose a tier**](search-sku-tier.md). One free search service is allowed per Azure subscription. All quickstarts and tutorials can be completed on a free service. For more capacity and capabilities, you will need to create a [billable service](https://azure.microsoft.com/pricing/details/search/).
66
+
1.[**Choose a tier**](search-sku-tier.md). One free search service is allowed per subscription. All quickstarts can be completed on the free tier. For more capacity and capabilities, you will need a [billable tier](https://azure.microsoft.com/pricing/details/search/).
67
67
68
68
1.[**Create a search service**](search-create-service-portal.md) in the Azure portal.
69
69
70
-
1.[**Start with Import data wizard**](search-get-started-portal.md) for the initial exploration. Choose a built-in sample data source to create, load, and query an index in minutes.
70
+
1.[**Start with Import data wizard**](search-get-started-portal.md). Choose a built-in sample data source to create, load, and query an index in minutes.
71
71
72
72
Alternatively, you can create, load, and query a search index in separate steps:
73
73
@@ -77,7 +77,8 @@ Alternatively, you can create, load, and query a search index in separate steps:
77
77
78
78
1.[**Query an index**](search-query-overview.md) using [Search explorer](search-explorer.md) in the portal, [REST API](search-get-started-rest.md), [.NET SDK](/dotnet/api/azure.search.documents.searchclient.search), or another SDK.
79
79
80
-
For help with complex or custom solutions, [**contact a partner**](resource-partners-knowledge-mining.md) with deep expertise in Cognitive Search technology.
80
+
> [!TIP]
81
+
> For help with complex or custom solutions, [**contact a partner**](resource-partners-knowledge-mining.md) with deep expertise in Cognitive Search technology.
0 commit comments