Skip to content

Commit fb8472e

Browse files
committed
Links
1 parent 50f5bb1 commit fb8472e

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

articles/search/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
href: /rest/api/searchservice
362362
- name: Search 2019-05-06-Preview
363363
href: /rest/api/searchservice/index-2019-05-06-preview
364-
- name: Management 2015-08-15
364+
- name: Management 2020-03-13
365365
href: /rest/api/searchmanagement
366366
- name: Management 2019-10-01-Preview
367367
href: /rest/api/searchmanagement/index-2019-10-01-preview

articles/search/search-faceted-navigation.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Faceted navigation is a filtering mechanism that provides self-directed drilldow
1616

1717
![Azure Cognitive Search Job Portal Demo](media/search-faceted-navigation/azure-search-faceting-example.png "Azure Cognitive Search Job Portal Demo")
1818

19-
Faceted navigation is an alternative entry point to search. It offers a convenient alternative to typing complex search expressions by hand. Facets can help you find what you're looking for, while ensuring that you dont get zero results. As a developer, facets let you expose the most useful search criteria for navigating your search index. In online retail applications, faceted navigation is often built over brands, departments (kids shoes), size, price, popularity, and ratings.
19+
Faceted navigation is an alternative entry point to search. It offers a convenient alternative to typing complex search expressions by hand. Facets can help you find what you're looking for, while ensuring that you don't get zero results. As a developer, facets let you expose the most useful search criteria for navigating your search index. In online retail applications, faceted navigation is often built over brands, departments (kid's shoes), size, price, popularity, and ratings.
2020

2121
Implementing faceted navigation differs across search technologies. In Azure Cognitive Search, faceted navigation is built at query time, using fields that you previously attributed in your schema.
2222

@@ -29,16 +29,16 @@ In your application development, writing code that constructs queries constitute
2929
## Sample code and demo
3030
This article uses a job search portal as an example. The example is implemented as an ASP.NET MVC application.
3131

32-
- See and test the working demo online at [Azure Cognitive Search Job Portal Demo](http://azjobsdemo.azurewebsites.net/).
32+
- See and test the working demo online at [Azure Cognitive Search Job Portal Demo](https://aka.ms/azjobsdemo).
3333

3434
- Download the code from the [Azure-Samples repo on GitHub](https://github.com/Azure-Samples/search-dotnet-asp-net-mvc-jobs).
3535

3636
## Get started
37-
If you're new to search development, the best way to think of faceted navigation is that it shows the possibilities for self-directed search. Its a type of drill-down search experience, based on predefined filters, used for quickly narrowing down search results through point-and-click actions.
37+
If you're new to search development, the best way to think of faceted navigation is that it shows the possibilities for self-directed search. It's a type of drill-down search experience, based on predefined filters, used for quickly narrowing down search results through point-and-click actions.
3838

3939
### Interaction model
4040

41-
The search experience for faceted navigation is iterative, so lets start by understanding it as a sequence of queries that unfold in response to user actions.
41+
The search experience for faceted navigation is iterative, so let's start by understanding it as a sequence of queries that unfold in response to user actions.
4242

4343
The starting point is an application page that provides faceted navigation, typically placed on the periphery. Faceted navigation is often a tree structure, with checkboxes for each value, or clickable text.
4444

@@ -73,9 +73,9 @@ Complex search expressions decrease the performance of the query. Where possible
7373
To better understand how a filter adds more precision, compare a complex search expression to one that includes a filter expression:
7474

7575
- `GET /indexes/hotel/docs?search=lodging budget +Seattle –motel +parking`
76-
- `GET /indexes/hotel/docs?search=lodging&$filter=City eq Seattle and Parking and Type ne motel`
76+
- `GET /indexes/hotel/docs?search=lodging&$filter=City eq 'Seattle' and Parking and Type ne 'motel'`
7777

78-
Both queries are valid, but the second is superior if youre looking for non-motels with parking in Seattle.
78+
Both queries are valid, but the second is superior if you're looking for non-motels with parking in Seattle.
7979
- The first query relies on those specific words being mentioned or not mentioned in string fields like Name, Description, and any other field containing searchable data.
8080
- The second query looks for precise matches on structured data and is likely to be much more accurate.
8181

@@ -102,9 +102,9 @@ In the following sections, we take a closer look at how to build each part.
102102

103103
## Build the index
104104
Faceting is enabled on a field-by-field basis in the index, via this index attribute: `"Facetable": true`.
105-
All field types that could possibly be used in faceted navigation are `Facetable` by default. Such field types include `Edm.String`, `Edm.DateTimeOffset`, and all the numeric field types (essentially, all field types are facetable except `Edm.GeographyPoint`, which cant be used in faceted navigation).
105+
All field types that could possibly be used in faceted navigation are `Facetable` by default. Such field types include `Edm.String`, `Edm.DateTimeOffset`, and all the numeric field types (essentially, all field types are facetable except `Edm.GeographyPoint`, which can't be used in faceted navigation).
106106

107-
When building an index, a best practice for faceted navigation is to explicitly turn faceting off for fields that should never be used as a facet. In particular, string fields for singleton values, such as an ID or product name, should be set to `"Facetable": false` to prevent their accidental (and ineffective) use in faceted navigation. Turning faceting off where you dont need it helps keep the size of the index small, and typically improves performance.
107+
When building an index, a best practice for faceted navigation is to explicitly turn faceting off for fields that should never be used as a facet. In particular, string fields for singleton values, such as an ID or product name, should be set to `"Facetable": false` to prevent their accidental (and ineffective) use in faceted navigation. Turning faceting off where you don't need it helps keep the size of the index small, and typically improves performance.
108108

109109
Following is part of the schema for the Job Portal Demo sample app, trimmed of some attributes to reduce the size:
110110

@@ -134,7 +134,7 @@ Following is part of the schema for the Job Portal Demo sample app, trimmed of s
134134
}
135135
```
136136

137-
As you can see in the sample schema, `Facetable` is turned off for string fields that shouldnt be used as facets, such as ID values. Turning faceting off where you dont need it helps keep the size of the index small, and typically improves performance.
137+
As you can see in the sample schema, `Facetable` is turned off for string fields that shouldn't be used as facets, such as ID values. Turning faceting off where you don't need it helps keep the size of the index small, and typically improves performance.
138138

139139
> [!TIP]
140140
> As a best practice, include the full set of index attributes for each field. Although `Facetable` is on by default for almost all fields, purposely setting each attribute can help you think through the implications of each schema decision.
@@ -227,7 +227,7 @@ SearchParameters sp = new SearchParameters()
227227

228228
A facet query parameter is set to a field and depending on the data type, can be further parameterized by comma-delimited list that includes `count:<integer>`, `sort:<>`, `interval:<integer>`, and `values:<list>`. A values list is supported for numeric data when setting up ranges. See [Search Documents (Azure Cognitive Search API)](https://docs.microsoft.com/rest/api/searchservice/Search-Documents) for usage details.
229229

230-
Along with facets, the request formulated by your application should also build filters to narrow down the set of candidate documents based on a facet value selection. For a bike store, faceted navigation provides clues to questions like *What colors, manufacturers, and types of bikes are available?*. Filtering answers questions like *Which exact bikes are red, mountain bikes, in this price range?*. When you click "Red" to indicate that only Red products should be shown, the next query the application sends includes `$filter=Color eq Red`.
230+
Along with facets, the request formulated by your application should also build filters to narrow down the set of candidate documents based on a facet value selection. For a bike store, faceted navigation provides clues to questions like *What colors, manufacturers, and types of bikes are available?*. Filtering answers questions like *Which exact bikes are red, mountain bikes, in this price range?*. When you click "Red" to indicate that only Red products should be shown, the next query the application sends includes `$filter=Color eq 'Red'`.
231231

232232
The following code snippet from the `JobsSearch.cs` page adds the selected Business Title to the filter if you select a value from the Business Title facet.
233233

@@ -266,7 +266,7 @@ If you build the list of facets dynamically based on untrusted user input, valid
266266
### Filtering tips
267267
**Increase search precision with filters**
268268

269-
Use filters. If you rely on just search expressions alone, stemming could cause a document to be returned that doesnt have the precise facet value in any of its fields.
269+
Use filters. If you rely on just search expressions alone, stemming could cause a document to be returned that doesn't have the precise facet value in any of its fields.
270270

271271
**Increase search performance with filters**
272272

@@ -293,7 +293,7 @@ In general, if you find that facet results are consistently too large, we recomm
293293

294294
For each faceted field in the navigation tree, there is a default limit of 10 values. This default makes sense for navigation structures because it keeps the values list to a manageable size. You can override the default by assigning a value to count.
295295

296-
* `&facet=city,count:5` specifies that only the first five cities found in the top ranked results are returned as a facet result. Consider a sample query with a search term of airport and 32 matches. If the query specifies `&facet=city,count:5`, only the first five unique cities with the most documents in the search results are included in the facet results.
296+
* `&facet=city,count:5` specifies that only the first five cities found in the top ranked results are returned as a facet result. Consider a sample query with a search term of "airport" and 32 matches. If the query specifies `&facet=city,count:5`, only the first five unique cities with the most documents in the search results are included in the facet results.
297297

298298
Notice the distinction between facet results and search results. Search results are all the documents that match the query. Facet results are the matches for each facet value. In the example, search results include City names that are not in the facet classification list (5 in our example). Results that are filtered out through faceted navigation become visible when you clear facets, or choose other facets besides City.
299299

@@ -305,11 +305,11 @@ Notice the distinction between facet results and search results. Search results
305305
* `&facet=City,count:12`<br/>
306306
In a facet query, you can set count to a value. The default is 10, but you can set it higher or lower. Setting `count:12` gets the top 12 matches in facet results by document count.
307307
* "`@odata.count`"<br/>
308-
In the query response, this value indicates the number of matching items in the search results. On average, its larger than the sum of all facet results combined, due to the presence of items that match the search term, but have no facet value matches.
308+
In the query response, this value indicates the number of matching items in the search results. On average, it's larger than the sum of all facet results combined, due to the presence of items that match the search term, but have no facet value matches.
309309

310310
**Get counts in facet results**
311311

312-
When you add a filter to a faceted query, you might want to retain the facet statement (for example, `facet=Rating&$filter=Rating ge 4`). Technically, facet=Rating isnt needed, but keeping it returns the counts of facet values for ratings 4 and higher. For example, if you click "4" and the query includes a filter for greater or equal to "4", counts are returned for each rating that is 4 and higher.
312+
When you add a filter to a faceted query, you might want to retain the facet statement (for example, `facet=Rating&$filter=Rating ge 4`). Technically, facet=Rating isn't needed, but keeping it returns the counts of facet values for ratings 4 and higher. For example, if you click "4" and the query includes a filter for greater or equal to "4", counts are returned for each rating that is 4 and higher.
313313

314314
**Make sure you get accurate facet counts**
315315

@@ -329,7 +329,7 @@ Labels are typically defined in the HTML or form (`index.cshtml` in the sample a
329329
## Filter based on a range
330330
Faceting over ranges of values is a common search application requirement. Ranges are supported for numeric data and DateTime values. You can read more about each approach in [Search Documents (Azure Cognitive Search API)](https://docs.microsoft.com/rest/api/searchservice/Search-Documents).
331331

332-
Azure Cognitive Search simplifies range construction by providing two approaches for computing a range. For both approaches, Azure Cognitive Search creates the appropriate ranges given the inputs youve provided. For instance, if you specify range values of 10|20|30, it automatically creates ranges of 0-10, 10-20, 20-30. Your application can optionally remove any intervals that are empty.
332+
Azure Cognitive Search simplifies range construction by providing two approaches for computing a range. For both approaches, Azure Cognitive Search creates the appropriate ranges given the inputs you've provided. For instance, if you specify range values of 10|20|30, it automatically creates ranges of 0-10, 10-20, 20-30. Your application can optionally remove any intervals that are empty.
333333

334334
**Approach 1: Use the interval parameter**
335335
To set price facets in $10 increments, you would specify: `&facet=price,interval:10`
@@ -353,7 +353,7 @@ To filter documents based on a range you select, you can use the `"ge"` and `"lt
353353
<a name="geofacets"></a>
354354

355355
## Filter based on distance
356-
Its common to see filters that help you choose a store, restaurant, or destination based on its proximity to your current location. While this type of filter might look like faceted navigation, its just a filter. We mention it here for those of you who are specifically looking for implementation advice for that particular design problem.
356+
It's common to see filters that help you choose a store, restaurant, or destination based on its proximity to your current location. While this type of filter might look like faceted navigation, it's just a filter. We mention it here for those of you who are specifically looking for implementation advice for that particular design problem.
357357

358358
There are two Geospatial functions in Azure Cognitive Search, **geo.distance** and **geo.intersects**.
359359

@@ -367,7 +367,7 @@ You can find filter examples in [OData expression syntax (Azure Cognitive Search
367367
## Try the demo
368368
The Azure Cognitive Search Job Portal Demo contains the examples referenced in this article.
369369

370-
- See and test the working demo online at [Azure Cognitive Search Job Portal Demo](https://azjobsdemo.azurewebsites.net/).
370+
- See and test the working demo online at [Azure Cognitive Search Job Portal Demo](https://aka.ms/azjobsdemo).
371371

372372
- Download the code from the [Azure-Samples repo on GitHub](https://github.com/Azure-Samples/search-dotnet-asp-net-mvc-jobs).
373373

articles/search/search-pagination-page-layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To quickly generate a search page for your client, explore these options:
2121
+ Use the [application generator](search-create-app-portal.md) in the portal to create an HTML page with a search bar, faceted navigation, and results area.
2222
+ Follow the [Create your first app in C#](tutorial-csharp-create-first-app.md) tutorial to create a functional client.
2323

24-
Several code samples include a web front-end interface, which you can find here: [New York City Jobs demo app](https://azjobsdemo.azurewebsites.net/), [JavaScript sample code with a live demo site](https://github.com/liamca/azure-search-javascript-samples), and [CognitiveSearchFrontEnd](https://github.com/LuisCabrer/CognitiveSearchFrontEnd).
24+
Several code samples include a web front-end interface, which you can find here: [New York City Jobs demo app](https://aka.ms/azjobsdemo), [JavaScript sample code with a live demo site](https://github.com/liamca/azure-search-javascript-samples), and [CognitiveSearchFrontEnd](https://github.com/LuisCabrer/CognitiveSearchFrontEnd).
2525

2626
> [!NOTE]
2727
> A valid request includes a number of elements, such as a service URL and path, HTTP verb, `api-version`, and so on. For brevity, we trimmed the examples to highlight just the syntax that is relevant to pagination. For more information about request syntax, see [Azure Cognitive Search REST APIs](https://docs.microsoft.com/rest/api/searchservice).

0 commit comments

Comments
 (0)