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-faceted-navigation.md
+5-7Lines changed: 5 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ author: HeidiSteen
8
8
ms.author: heidist
9
9
ms.service: cognitive-search
10
10
ms.topic: conceptual
11
-
ms.date: 12/13/2021
12
-
ms.custom: devx-track-csharp
11
+
ms.date: 07/22/2022
12
+
13
13
---
14
14
15
15
# Add faceted navigation to a search app
@@ -82,7 +82,7 @@ If you are using one of the Azure SDKs, your code must specify all field attribu
82
82
83
83
You cannot use `Edm.GeographyPoint` or `Collection(Edm.GeographyPoint)` fields in faceted navigation. Facets work best on fields with low cardinality. Due to the resolution of geo-coordinates, it is rare that any two sets of coordinates will be equal in a given dataset. As such, facets are not supported for geo-coordinates. You would need a city or region field to facet by location.
84
84
85
-
> [!Tip]
85
+
> [!TIP]
86
86
> As a best practice for performance and storage optimization, turn faceting off for fields that should never be used as a facet. In particular, string fields for unique values, such as an ID or product name, should be set to `"facetable": false` to prevent their accidental (and ineffective) use in faceted navigation. This is especially true for the REST API that enables filters and facets by default.
87
87
88
88
## Facet request and response
@@ -178,11 +178,9 @@ Each range is built using 0 as a starting point, a value from the list as an end
178
178
179
179
### Discrepancies in facet counts
180
180
181
-
Under certain circumstances, you might find that facet counts do not match the result sets (see [Faceted navigation in Azure Cognitive Search (Microsoft Q&A question page)](/answers/topics/azure-cognitive-search.html)).
182
-
183
-
Facet counts can be inaccurate due to the sharding architecture. Every search index has multiple shards, and each shard reports the top N facets by document count, which is then combined into a single result. If some shards have many matching values, while others have fewer, you may find that some facet values are missing or under-counted in the results.
181
+
Under certain circumstances, you might find that facet counts don't align to the search results. Facet counts can be inaccurate due to the [sharding architecture](search-capacity-planning.md#concepts-search-units-replicas-partitions-shards). Every search index has multiple shards, and each shard reports the top N facets by document count, which are then combined into a single result. If some shards have many matching values, while others have fewer, you may find that some facet values are missing or under-counted in the results.
184
182
185
-
Although this behavior could change at any time, if you encounter this behavior today, you can work around it by artificially inflating the count:\<number> to a large number to enforce full reporting from each shard. If the value of count: is greater than or equal to the number of unique values in the field, you are guaranteed accurate results. However, when document counts are high, there is a performance penalty, so use this option judiciously.
183
+
To guarantee accuracy, you can artificially inflate the count:\<number> to a large number to force full reporting from each shard. You can specify "count": "0" for unlimited facets. Or, you can set "count" to a value that's greater than or equal to the number of unique values of the faceted field. However, if there are a large number of documents returned in the query, the performance will be slow, so use this workaround only when necessary.
Copy file name to clipboardExpand all lines: articles/search/search-pagination-page-layout.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,6 @@ Count is accurate when the index is stable. For an index under constant churn, t
59
59
60
60
Count won't be affected by routine maintenance or other workloads on the search service. However if you have multiple partitions and a single replica, you could experience short-term fluctuations in document count (several minutes) as the partitions are restarted.
61
61
62
-
For counts in [faceted navigation](search-faceted-navigation.md), count should always be considered as approximate, especially if you're working with large indexes. Internally, the system gives up a small amount of precision when aggregating the matches over multiple shards. Although the facet count might be slightly off, a filter based on the facet will be accurate. For example, a facet count might show as 98, but if the number of matches is actually 100, the results from using that filter will include all 100 matches. For more information, see [Discrepancies in facet counts](search-faceted-navigation.md#discrepancies-in-facet-counts).
63
-
64
62
> [!TIP]
65
63
> When testing indexing, add `$count=true` to confirm the number of documents in the index. When testing query syntax, `$count=true` can quickly tell you whether your modifications are returning greater or fewer results.
0 commit comments