您现在访问的是微软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 a Free, Basic, or Standard pricing tier.

  • 免费层是 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 高密度 (S3 HD)。Standard comes in four levels: S1, S2, S3, and S3 High Density (S3 HD).

备注

服务已在特定层上进行预配。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.

每个订阅限制Per 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 免费Free 基本Basic S1S1 S2S2 S3S3 S3 HD 1S3 HD 1
最大服务数Maximum services 11 1212 1212 66 66 66
最大规模(以 SU 为单位)2Maximum scale in SU 2 不适用 3N/A 3 3 个 SU 43 SU 4 36 个 SU36 SU 36 个 SU36 SU 36 个 SU36 SU 36 个 SU36 SU

1 S3 HD 目前不支持索引器1 S3 HD does not support indexers at this time.

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. 若要详细了解搜索单位的计算方式,以及如何通过图表来获取各种有效的组合方式,以便确保不超出最大数目限制,请参阅缩放查询和索引工作负荷的资源级别To learn more about how search units are computed, plus a chart of valid combinations that stay under the maximum limits, see Scale resource levels for query and index workloads.

3 免费取决于是否由多个订户使用共享的资源。3 Free is based on shared resources used by multiple subscribers. 此层没有供单个订户使用的专用资源。At this tier, there are no dedicated resources for an individual subscriber. 因此,“最大规模”标记为“不适用”。For this reason, maximum scale is marked as not applicable.

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

每个服务限制Per service limits

存储受磁盘空间限制,或者受索引或文档的最大数目的硬性限制,具体取决于哪一个限制先实施。Storage is constrained by disk space or by a hard limit on the maximum number of indexes or documents, whichever comes first.

资源Resource 免费Free 基本Basic S1S1 S2S2 S3S3 S3 HDS3 HD
服务级别协议 (SLA)Service Level Agreement (SLA) 1No 1 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 3 23 2
分区大小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
最大索引数Maximum indexes 33 55 5050 200200 200200 每个分区 1000,或者每个服务 30001000 per partition or 3000 per service
最大索引器数Maximum indexers 33 55 5050 200200 200200 无索引器支持No indexer support
最大数据源数Maximum datasources 33 55 5050 200200 200200 无索引器支持No indexer support
最大文档数Maximum documents 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

1 免费层和预览功能不带服务级别协议 (SLA)。1 Free tier and preview features do not come with service level agreements (SLAs). 对于所有可计费的层,SLA 将在用户为服务提供足够冗余时生效。For all billable tiers, 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.

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.

每个索引限制Per index limits

索引限制与索引器限制之间存在一对一的对应关系。There is a one-to-one correspondence between limits on indexes and limits on indexers. 假定限制为 200 个索引,则相同服务的索引器最大限制也是 200。Given a limit of 200 indexes, the maximum limit for indexers is also 200 for the same service.

资源Resource 免费Free 基本Basic S1S1 S2S2 S3S3 S3 HDS3 HD
索引:每个索引的最大字段Index: maximum fields per index 10001000 100 1100 1 10001000 10001000 10001000 10001000
索引:每个索引的最大计分配置文件Index: maximum scoring profiles per index 100100 100100 100100 100100 100100 100100
索引:每个配置文件的最大函数Index: maximum functions per profile 88 88 88 88 88 88
索引器:每次调用的最大索引编制负载Indexers: 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 2N/A 2
索引器:最长运行时间Indexers: maximum running time 1-3 分钟 31-3 minutes 3 24 小时24 hours 24 小时24 hours 24 小时24 hours 24 小时24 hours N/A 2N/A 2
Blob 索引器:最大 blob 大小,MBBlob indexer: maximum blob size, MB 1616 1616 128128 256256 256256 N/A 2N/A 2
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 2N/A 2

1 基本层是唯一具有最低限制(每个索引 100 个字段)的 SKU。1 Basic tier is the only SKU with a lower limit of 100 fields per index.

2 S3 HD 当前不支持索引器。2 S3 HD doesn't currently support indexers. 如果亟需此功能,请联系 Azure 支持。Contact Azure Support if you have an urgent need for this capability.

3 对于免费层,索引器最长执行时间为 blob 源 3 分钟,所有其他数据源 1 分钟。3 Indexer maximum execution time for the Free tier is 3 minutes for blob sources and 1 minute for all other data sources.

文档大小限制Document size limits

资源Resource 免费Free 基本Basic S1S1 S2S2 S3S3 S3 HDS3 HD
每个索引 API 的单个文档大小Individual document size per Index API <16 MB<16 MB <16 MB<16 MB <16 MB<16 MB <16 MB<16 MB <16 MB<16 MB <16 MB<16 MB

是指调用索引 API 时最大文档大小。Refers to the maximum document size when calling an Index API. 文档大小实际上是索引 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 actually 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.

每秒查询次数 (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