您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure 搜索中的服务限制Service limits in Azure Search

对存储、工作负荷以及索引、文档和其他对象数量的最大限制,取决于是在“免费”、“基本”还是“标准”定价层上预配 Azure 搜索Maximum limits on storage, workloads, and quantities of indexes, documents, and other objects depend on whether you provision Azure Search at Free, Basic, or Standard pricing tiers.

  • 免费层是 Azure 订阅随附的多租户共享服务。Free is a multi-tenant shared service that comes with your Azure subscription.

  • 基本层为小规模生产工作负荷提供专用计算资源。Basic provides dedicated computing resources for production workloads at a smaller scale.

  • 标准层在专用计算机上运行,在每个级别上都具有更多存储和处理容量。Standard runs on dedicated machines with more storage and processing capacity at every level. 标准层共有四个级别:S1、S2、S3 和 S3 HD。Standard comes in four levels: S1, S2, S3, and S3 HD.

    S3 高密度 (S3 HD) 是针对特定工作负荷设计的:多租户和大量的小索引(每个索引一百万个文档,每个服务三千个索引)。S3 High Density (S3 HD) is engineered for specific workloads: multi-tenancy and large quantities of small indexes (one million documents per index, three thousand indexes per service). 此层未提供索引器功能This tier does not provide the indexer feature. 在 S3 HD 上,数据引入必须利用推送方式,使用 API 调用将数据从源推送到索引。On S3 HD, data ingestion must leverage the push approach, using API calls to push data from source to index.

备注

服务已在特定层上进行预配。A service is provisioned at a specific tier. 跳转层以获取容量涉及预配新的服务(不会就地升级)。Jumping tiers to gain capacity involves provisioning a new service (there is no in-place upgrade). 有关详细信息,请参阅选择 SKU 或层For more information, see Choose a SKU or tier. 若要详细了解在已预配的服务内调整容量,请参阅缩放查询和为工作负荷编制索引的资源级别To learn more about adjusting capacity within a service you've already provisioned, see Scale resource levels for query and indexing workloads.

订阅限制Subscription limits

可以在一个订阅中创建多个服务,每个服务在特定层进行预配,仅受每个层所允许的服务数所限制。You can create multiple services within a subscription, each one provisioned at a specific tier, limited only by the number of services allowed at each tier. 例如,在同一订阅中,最多可以在基本层创建 12 个服务,在 S1 层也创建 12 个服务。For example, you could create up to 12 services at the Basic tier and another 12 services at the S1 tier within the same subscription. 有关层的详细信息,请参阅为 Azure 搜索选择 SKU 或层For more information about tiers, see Choose a SKU or tier for Azure Search.

最大服务数限制可以根据请求提高。Maximum service limits can be raised upon request. 如果需要在同一订阅中使用更多服务,请与 Azure 支持部门联系。Contact Azure Support if you need more services within the same subscription.

资源Resource 免费 1Free 1 基本Basic S1S1 S2S2 S3S3 S3 HDS3 HD
最大服务数Maximum services 11 1212 1212 66 66 66
最大规模(以 SU 为单位) 2Maximum scale in SU 2 不适用N/A 3 SU3 SU 36 个 SU36 SU 36 个 SU36 SU 36 个 SU36 SU 36 个 SU36 SU

1 免费层基于共享资源,而不基于专用资源。1 Free is based on shared, not dedicated, resources. 共享资源不支持纵向扩展。Scale-up is not supported on shared resources.

2 搜索单位 (SU) 即计费单位,以副本分区形式分配。2 Search units (SU) are billing units, allocated as either a replica or a partition. 进行存储、索引和查询操作同时需要这两个资源。You need both resources for storage, indexing, and query operations. 若要了解有关 SU 计算的详细信息,请参阅缩放查询和索引工作负荷的资源级别To learn more about SU computations, see Scale resource levels for query and index workloads.

存储限制Storage limits

存储受磁盘空间限制,或者受索引、文档或其他高级资源的最大数目的硬性限制,具体取决于哪一个限制先实施。Storage is constrained by disk space or by a hard limit on the maximum number of indexes, document, or other high-level resources, whichever comes first. 下表描述了存储限制。The following table documents storage limits. 有关索引、文档和其他对象的最大限制,请参阅按资源限制For maximum limits on indexes, documents, and other objects, see limits by resource.

资源Resource 免费Free 基本 1Basic 1 S1S1 S2S2 S3S3 S3 HD 2S3 HD 2
服务级别协议 (SLA) 3Service Level Agreement (SLA) 3 No Yes Yes Yes Yes Yes
每个分区的存储Storage per partition 50 MB50 MB 2 GB2 GB 25 GB25 GB 100 GB100 GB 200 GB200 GB 200 GB200 GB
每个服务的分区数Partitions per service 不适用N/A 11 1212 1212 1212 33
分区大小Partition size 不适用N/A 2 GB2 GB 25 GB25 GB 100 GB100 GB 200 GB200 GB 200 GB200 GB
副本Replicas 不适用N/A 33 1212 1212 1212 1212

1 基本层有一个固定分区。1 Basic has one fixed partition. 此层可以使用额外的 SU,以便在查询工作负荷增加时分配更多的副本。At this tier, additional SUs are used for allocating more replicas for increased query workloads.

2 S3 HD 的硬性限制为 3 个分区,低于 S3 的分区限制。2 S3 HD has a hard limit of 3 partitions, which is lower than the partition limit for S3. 施加的分区限制较低是因为 S3 HD 的索引计数要高得多。The lower partition limit is imposed because the index count for S3 HD is substantially higher. 由于计算资源(存储和处理)和内容(索引和文档)都存在服务限制,因此会先达到内容限制。Given that service limits exist for both computing resources (storage and processing) and content (indexes and documents), the content limit is reached first.

3 为可计费服务提供了针对专用资源的服务级别协议 (SLA)。3 Service level agreements (SLAs) are offered for billable services on dedicated resources. 免费服务和预览功能没有 SLA。Free services and preview features have no SLA. 对于可计费服务,SLA 将在用户为服务预配足够冗余时生效。For billable services, SLAs take effect when you provision sufficient redundancy for your service. 查询(读取)SLA 需要两个或多个副本。Two or more replicas are required for query (read) SLA. 查询和索引(读-写)SLA 需要不少于三个副本。Three or more replicas are required for query and indexing (read-write) SLA. 分区数不属于 SLA 相关考虑因素。The number of partitions is not an SLA consideration.

索引限制Index limits

资源Resource 免费Free 基本 1Basic 1 S1S1 S2S2 S3S3 S3 HDS3 HD
最大索引数Maximum indexes 33 5 或 155 or 15 5050 200200 200200 每个分区 1000,或者每个服务 30001000 per partition or 3000 per service
每个索引的最大字段Maximum fields per index 10001000 100100 10001000 10001000 10001000 10001000
每个索引的最大计分配置文件Maximum scoring profiles per index 100100 100100 100100 100100 100100 100100
每个配置文件的最大函数数量Maximum functions per profile 88 88 88 88 88 88

1 2017 年底后创建的基本服务的上限已增大为 15 个索引、数据源和索引器。1 Basic services created after late 2017 have an increased limit of 15 indexes, data sources, and indexers. 之前创建的服务的上限为 5。Services created earlier have 5. 基本层是唯一具有下限(每个索引 100 个字段)的 SKU。Basic tier is the only SKU with a lower limit of 100 fields per index.

文档限制Document limits

在大多数区域中,对于在 2017 年 11 月/12 月之后创建的所有服务,Azure 搜索定价层(基本、S1、S2、S3、S3 HD)对文档数没有限制。In most regions, Azure Search pricing tiers (Basic, S1, S2, S3, S3 HD) have unlimited document counts for all services created after November/December 2017. 本部分介绍了施加了限制的区域以及如何确定你的服务是否受影响。This section identifies the regions where limits apply, and how to determine whether your service is affected.

若要确定你的服务是否具有文档数限制,请检查你的服务的概述页中的“使用情况”磁贴。To determine whether your service has document limits, check the Usage tile in the overview page of your service. 文档数可能不受限制,也可能基于层受限于某个限制。Document counts are either unlimited, or subject to a limit based on tier.

“使用情况”磁贴

具有文档数限制的区域和服务Regions and services having document limits

具有限制的服务是在 2017 年底之前创建的,或者是在使用较低容量群集来承载 Azure 搜索服务的数据中心内运行。Services having limits were either created before late 2017, or are running on data centers using lower-capacity clusters for hosting Azure Search services. 受影响的数据中心位于以下区域:Affected data centers are in the following regions:

  • 澳大利亚东部Australia East
  • 东亚East Asia
  • 印度中部Central India
  • 日本西部Japan West
  • 美国中西部West Central US

对于具有文档数限制的服务,将应用以下上限:For services subject to document limits, the following maximum limits apply:

免费Free 基本Basic S1S1 S2S2 S3S3 S3 HDS3 HD
10,00010,000 1 百万1 million 每个分区 1500 万,或者每个服务 1 亿 8 千万15 million per partition or 180 million per service 每个分区 6 千万,或者每个服务 7 亿 2 千万60 million per partition or 720 million per service 每个分区 1 亿 2 千万,或者每个服务 14 亿120 million per partition or 1.4 billion per service 每个索引 1 百万,或者每个分区 2 亿1 million per index or 200 million per partition

备注

对于 2017 年底后创建的 S3 高密度服务,已去除每个分区 2 亿个文档的限制,但每个索引 100 万个文档的限制保留。For S3 High Density services created after late 2017, the 200 million document per partition has been removed but the 1 million document per index limit remains.

每个 API 调用的文档大小限制Document size limits per API call

调用索引 API 时的最大文档大小大约为 16 MB。The maximum document size when calling an Index API is approximately 16 megabytes.

文档大小实际上是索引 API 请求主体大小的限制。Document size is actually a limit on the size of the Index API request body. 由于可以将包含多个文档的批次传递给索引 API,因此大小限制实际上取决于批次中的文档数。Since you can pass a batch of multiple documents to the Index API at once, the size limit realistically depends on how many documents are in the batch. 对于具有单个文档的批次,最大文档大小是 16 MB JSON。For a batch with a single document, the maximum document size is 16 MB of JSON.

要保持较低的文档大小,务必将不可查询数据从请求中排除。To keep document size down, remember to exclude non-queryable data from the request. 图像和其他二进制数据不可直接查询,并且不应存储在索引中。Images and other binary data are not directly queryable and shouldn't be stored in the index. 要将不可查询的数据集成到搜索结果中,请定义用于存储资源的 URL 引用的不可搜索字段。To integrate non-queryable data into search results, define a non-searchable field that stores a URL reference to the resource.

索引器限制Indexer limits

2017 年底后创建的基本服务增加了限制,即 15 个索引、数据源和索引器。Basic services created after late 2017 have an increased limit of 15 indexes, data sources, and indexers.

资源Resource 免费 1Free 1 基本 2Basic 2 S1S1 S2S2 S3S3 S3 HD 3S3 HD 3
最大索引器数Maximum indexers 33 5 或 155 or 15 5050 200200 200200 不适用N/A
最大数据源数Maximum datasources 33 5 或 155 or 15 5050 200200 200200 不适用N/A
每次调用的最大索引编制负载Maximum indexing load per invocation 10,000 个文档10,000 documents 仅受最大文档的限制Limited only by maximum documents 仅受最大文档的限制Limited only by maximum documents 仅受最大文档的限制Limited only by maximum documents 仅受最大文档的限制Limited only by maximum documents 不适用N/A
最长运行时间Maximum running time 1-3 分钟1-3 minutes 24 小时24 hours 24 小时24 hours 24 小时24 hours 24 小时24 hours 不适用N/A
Blob 索引器:最大 blob 大小,MBBlob indexer: maximum blob size, MB 1616 1616 128128 256256 256256 不适用N/A
Blob 索引器:从 blob 中提取的内容的最大字符数Blob indexer: maximum characters of content extracted from a blob 32,00032,000 64,00064,000 4 百万4 million 4 百万4 million 4 百万4 million 不适用N/A

1 对于免费服务,对于 blob 源,索引器最长执行时间为 3 分钟;对于所有其他数据源,索引器最长执行时间为为 1 分钟。1 Free services have indexer maximum execution time of 3 minutes for blob sources and 1 minute for all other data sources.

2 2017 年底后创建的基本服务的上限已增大为 15 个索引、数据源和索引器。2 Basic services created after late 2017 have an increased limit of 15 indexes, data sources, and indexers. 之前创建的服务的上限为 5。Services created earlier have 5.

3 S3 HD 服务未包括索引器支持。3 S3 HD services do not include indexer support.

每秒查询次数 (QPS)Queries per second (QPS)

每个客户必须独立制定 QPS 估计值。QPS estimates must be developed independently by every customer. 索引大小和复杂性、查询大小和复杂性以及流量大小是 QPS 的主要决定因素。Index size and complexity, query size and complexity, and the amount of traffic are primary determinants of QPS. 当此类因素未知时,没有方法能提供有意义的估计值。There is no way to offer meaningful estimates when such factors are unknown.

针对专用资源(基本层和标准层)上运行的服务进行计算时,估计值更可预测。Estimates are more predictable when calculated on services running on dedicated resources (Basic and Standard tiers). 由于能够控制更多参数,因此可以更精确地评估 QPS。You can estimate QPS more closely because you have control over more of the parameters. 有关如何方法估算的指南,请参阅 Azure 搜索的性能和优化For guidance on how to approach estimation, see Azure Search performance and optimization.

API 请求限制API Request limits

  • 每个请求最大 16 MB 1Maximum of 16 MB per request 1
  • 最大 8 KB URL 长度Maximum 8 KB URL length
  • 每个索引上传、合并或删除的批次最多包含 1000 个文档Maximum 1000 documents per batch of index uploads, merges, or deletes
  • $Orderby 子句中最多 32 字段Maximum 32 fields in $orderby clause
  • 最大搜索词大小为 UTF-8 编码文本的 32,766 字节(32 KB 减 2 个字节)Maximum search term size is 32,766 bytes (32 KB minus 2 bytes) of UTF-8 encoded text

1 在 Azure 搜索中,请求主体受 16 MB 上限的约束,这会针对不受理论限制约束的单个字段或集合的内容施加实际限制(有关字段组合和限制的详细信息,请参阅支持的数据类型)。1 In Azure Search, the body of a request is subject to an upper limit of 16 MB, imposing a practical limit on the contents of individual fields or collections that are not otherwise constrained by theoretical limits (see Supported data types for more information about field composition and restrictions).

API 响应限制API Response limits

  • 每页搜索结果最多返回 1000 个文档Maximum 1000 documents returned per page of search results
  • 每个建议 API 请求最多返回 100 条建议Maximum 100 suggestions returned per Suggest API request

API 密钥限制API Key limits

API 密钥用于服务身份验证。Api-keys are used for service authentication. 有两种类型。There are two types. 管理密钥在请求标头中指定,并授予对服务的完全读写访问权限。Admin keys are specified in the request header and grant full read-write access to the service. 查询密钥是只读密钥并在 URL 上指定,并且通常分发给客户端应用程序。Query keys are read-only, specified on the URL, and typically distributed to client applications.

  • 每个服务最多 2 个管理密钥Maximum of 2 admin keys per service
  • 每个服务最多 50 个查询密钥Maximum of 50 query keys per service