Skip to content

Commit da35fb2

Browse files
committed
updates based on email exchanges
1 parent 7efca52 commit da35fb2

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

articles/search/search-faceted-navigation.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 12/13/2021
12-
ms.custom: devx-track-csharp
11+
ms.date: 07/22/2022
12+
1313
---
1414

1515
# 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
8282

8383
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.
8484

85-
> [!Tip]
85+
> [!TIP]
8686
> 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.
8787
8888
## 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
178178

179179
### Discrepancies in facet counts
180180

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

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

187185
## Presentation layer
188186

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ Count is accurate when the index is stable. For an index under constant churn, t
5959

6060
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.
6161

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-
6462
> [!TIP]
6563
> 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.
6664

0 commit comments

Comments
 (0)