Skip to content

Commit d76b46a

Browse files
committed
reformatted the example query section in portal get-started
1 parent e216b16 commit d76b46a

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

articles/search/search-get-started-portal.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -144,37 +144,46 @@ Moving forward, you should now have a search index that's ready to query using t
144144

145145
## Example queries
146146

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).
148148

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). |
150159

151-
#### Example (string query): `search=spa`
160+
<!-- ### Simple query with top N results: `search=spa`
152161
153162
+ 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.
154163
155164
+ **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.
156165
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. -->
158167

159-
#### Example (parameterized query): `search=spa&$count=true&$top=10`
168+
<!-- #### Example (parameterized query): `search=spa&$count=true&$top=10`
160169
161170
+ The **&** symbol is used to append search parameters, which can be specified in any order.
162171
163172
+ 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.
164173
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**. -->
166175

167-
### <a name="filter-query"></a> Filter the query
176+
<!-- ### <a name="filter-query"></a> Filter the query
168177
169178
Filters are included in search requests when you append the **$filter** parameter.
170179
171180
#### Example (filtered): `search=beach&$filter=Rating gt 4`
172181
173182
+ The **$filter** parameter returns results matching the criteria you provided. In this case, ratings greater than 4.
174183
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). -->
176185

177-
### <a name="facet-query"></a> Facet the query
186+
<!-- ### <a name="facet-query"></a> Facet the query
178187
179188
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.
180189
@@ -191,8 +200,8 @@ Facet filters are included in search requests. You can use the facet parameter t
191200
192201
+ Only filterable fields can be faceted. Only retrievable fields can be returned in the results.
193202
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). -->
204+
<!--
196205
### <a name="highlight-query"></a> Highlight search results
197206
198207
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
205214
206215
+ 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.
207216
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. -->
209218

210-
### <a name="fuzzy-search"></a> Try fuzzy search
219+
<!-- ### <a name="fuzzy-search"></a> Try fuzzy search
211220
212221
By default, misspelled query terms, like *seatle* for "Seattle", fail to return matches in typical search. The following example returns no results.
213222
@@ -223,15 +232,15 @@ When **queryType** is unspecified, the default simple query parser is used. The
223232
224233
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.
225234
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). -->
236+
<!--
228237
### <a name="geo-search"></a> Try geospatial search
229238
230239
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.
231240
232241
#### 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`
233242
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. -->
235244

236245
## Takeaways
237246

articles/search/search-what-is-azure-search.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ For more information about specific functionality, see [Features of Azure Cognit
6363

6464
An end-to-end exploration of core search features can be achieved in four steps:
6565

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/).
6767

6868
1. [**Create a search service**](search-create-service-portal.md) in the Azure portal.
6969

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.
7171

7272
Alternatively, you can create, load, and query a search index in separate steps:
7373

@@ -77,7 +77,8 @@ Alternatively, you can create, load, and query a search index in separate steps:
7777

7878
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.
7979

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.
8182
8283
## Compare search options
8384

0 commit comments

Comments
 (0)