azure-search-documents-py
使用 Python 构建 Azure AI Search 应用
Azure AI Search 项目需要针对索引、查询、向量和扩充的正确 SDK 模式。此技能提供实用的 Python 示例,用于构建和运行搜索工作流。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "azure-search-documents-py" from https://skillstore.io/skills/sickn33-azure-search-documents-py.md and its manifest at https://skillstore.io/api/skills/sickn33-azure-search-documents-py/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“azure-search-documents-py”。 我需要使用文本和嵌入查询 Azure AI Search 索引。
预期结果:
一个混合检索计划,说明客户端设置、向量查询构造、选定字段、筛选器、结果限制和语义排序选项。
正在使用“azure-search-documents-py”。 我需要为带有嵌入的文档创建一个新索引。
预期结果:
一个面向 Python 的索引设计,包含关键字段、可搜索文本字段、嵌入字段、向量配置文件设置和语义配置指导。
正在使用“azure-search-documents-py”。 我需要为搜索客户端提供更安全的生产身份验证。
预期结果:
建议使用 DefaultAzureCredential,定义必需的环境设置,尽可能避免生产环境 API 密钥,并在部署前验证权限。
安全审计
安全All static findings are false positives caused by Markdown formatting, static Python imports, Azure placeholders, documented environment access, and search terminology. No command execution, embedded secret, exfiltration, prompt injection, or malicious intent was found.
风险因素
⚙️ 外部命令 (50)
🌐 网络访问 (2)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/sickn33-azure-search-documents-py/audits/5?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/sickn33-azure-search-documents-py?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/sickn33-azure-search-documents-py?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/sickn33-azure-search-documents-py/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/sickn33-azure-search-documents-py.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
sickn33. (2026). azure-search-documents-py security audit report (audit version 5) [Author version unspecified]. Skillstore. https://skillstore.io/skills/sickn33-azure-search-documents-py/audits/5BibTeX 引用
@techreport{sickn33-sickn33-azure-search-documents-py-2026,
author = {sickn33},
title = {azure-search-documents-py security audit report (audit version 5)},
institution = {Skillstore},
year = {2026},
number = {5},
url = {https://skillstore.io/skills/sickn33-azure-search-documents-py/audits/5},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "azure-search-documents-py security audit report (audit version 5)"
version: "unspecified"
type: report
authors:
- name: "sickn33"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/sickn33-azure-search-documents-py/audits/5"
identifiers:
- type: other
value: "skillstore:sickn33-azure-search-documents-py:audit:5"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
创建搜索索引
在 Python 中定义字段、向量配置文件、语义配置和幂等索引创建。
为 AI 应用添加检索
为检索工作流组合向量查询、关键字搜索、筛选器和语义排序。
维护搜索数据管道
使用上传、合并、删除、批处理、索引器、技能组和错误处理模式。
试试这些提示
使用 Azure Search Documents Python SDK 为我现有的索引创建一个 SearchClient。优先使用 DefaultAzureCredential,并解释我需要哪些环境值。
为包含 id、title、content 和 embedding 字段的 Azure AI Search 索引起草 Python 代码。包含 HNSW 向量搜索设置,以及有关匹配嵌入维度的说明。
创建一个 Python 搜索模式,使用 VectorizedQuery、关键字文本、选定字段、筛选器、top 结果和语义排序来运行混合检索。
为批量文档引入、索引器设置、技能组扩充、具备重试感知的上传以及生产环境错误处理,设计一个 Azure AI Search Python 工作流。
最佳实践
- 在部署支持的情况下,生产身份验证优先使用 DefaultAzureCredential。
- 在创建或更新索引之前,使向量维度与嵌入模型匹配。
- 对大型文档引入工作负载使用批处理和具备重试感知的客户端。
避免
- 不要在生成的应用程序代码中硬编码真实服务密钥或端点。
- 不要在同一个字段中混用来自不同嵌入模型的向量维度。
- 不要在未调整字段、筛选器、权限和排序设置的情况下部署示例架构。