Documents - Search Post
搜索索引中的文档。
POST {endpoint}/indexes('{indexName}')/docs/search.post.search?api-version=2026-04-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
搜索服务的终结点 URL。 |
|
index
|
path | True |
string |
索引的名称。 |
|
api-version
|
query | True |
string minLength: 1 |
用于此操作的 API 版本。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| Accept |
接受(Accept)首部。 |
||
| x-ms-client-request-id |
string (uuid) |
请求的不透明、全局唯一的客户端生成的字符串标识符。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| answers |
一个值,该值指定是否应作为搜索响应的一部分返回答案。 |
|
| captions |
一个值,该值指定是否应返回标题作为搜索响应的一部分。 |
|
| count |
boolean |
一个值,该值指定是否提取结果总数。 默认值为 false。 将此值设置为 true 可能会影响性能。 请注意,返回的计数是近似值。 |
| debug |
启用调试工具,可用于进一步探索重新排名的结果。 |
|
| facets |
string[] |
要应用于搜索查询的分面表达式列表。 每个分面表达式都包含一个字段名称,可以选择后跟逗号分隔的名称:值对列表。 |
| filter |
string |
要应用于搜索查询的 OData $filter表达式。 |
| highlight |
string |
用于命中突出显示的字段名称的逗号分隔列表。 只能使用可搜索字段进行命中突出显示。 |
| highlightPostTag |
string |
追加到命中突出显示的字符串标记。 必须使用 highlightPreTag 进行设置。 默认值为 /em <>。 |
| highlightPreTag |
string |
前面追加的字符串标记以命中突出显示。 必须使用 highlightPostTag 进行设置。 默认值为 em<>。 |
| minimumCoverage |
number (double) |
介于 0 和 100 之间的数字,指示搜索查询必须涵盖的索引百分比,以便将查询报告为成功。 此参数可用于确保仅包含一个副本的服务的搜索可用性。 默认值为 100。 |
| orderby |
string |
以逗号分隔的 OData $orderby表达式列表,用于对结果进行排序。 每个表达式可以是字段名称,也可以是对 geo.distance() 或 search.score() 函数的调用。 每个表达式后跟 asc 以指示升序,或 desc 表示降序。 默认值为升序。 关系将由匹配文档的分数中断。 如果未指定$orderby,则默认排序顺序按文档匹配分数降序。 最多可以有 32 个$orderby子句。 |
| queryType |
一个值,指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”。 |
|
| scoringParameters |
string[] |
在评分函数(例如 referencePointParameter)中使用格式名称值的参数值列表。 例如,如果计分配置文件使用名为“mylocation”的参数定义函数,则参数字符串将为“mylocation--122.2,44.8”(不含引号)。 |
| scoringProfile |
string |
要评估匹配文档的匹配分数的计分配置文件的名称,以便对结果进行排序。 |
| scoringStatistics |
一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。 |
|
| search |
string |
全文搜索查询表达式;使用“*”或省略此参数以匹配所有文档。 |
| searchFields |
string |
要限定全文搜索范围的字段名称的逗号分隔列表。 在完整的 Lucene 查询中使用字段搜索(fieldName:searchExpression),每个字段搜索表达式的字段名称优先于此参数中列出的任何字段名称。 |
| searchMode |
一个值,该值指定是否必须匹配任何搜索词或全部搜索词,以便将文档计数为匹配项。 |
|
| select |
string |
要检索的字段的逗号分隔列表。 如果未指定,则包含标记为在架构中可检索的所有字段。 |
| semanticConfiguration |
string |
处理类型语义查询的文档时将使用的语义配置的名称。 |
| semanticErrorHandling |
允许用户选择语义调用是完全失败(默认/当前行为)还是返回部分结果。 |
|
| semanticMaxWaitInMilliseconds |
integer (int32) minimum: 700 |
允许用户在请求失败之前设置语义扩充完成处理所需的时间上限。 |
| semanticQuery |
string |
允许设置单独的搜索查询,该查询将仅用于语义重排、语义标题和语义答案。 对于需要在基础检索和排名阶段和 L2 语义阶段之间使用不同的查询的情况,非常有用。 |
| sessionId |
string |
用于创建粘性会话的值,有助于获得更一致的结果。 只要使用了同一 sessionId,就会尝试以相同的副本集为目标。 谨慎地重复使用相同的 sessionID 值可能会干扰跨副本的请求负载均衡,并对搜索服务的性能产生不利影响。 用作 sessionId 的值不能以“_”字符开头。 |
| skip |
integer (int32) |
要跳过的搜索结果数。 此值不能大于 100,000。 如果需要按顺序扫描文档,但由于此限制而无法使用 skip,请考虑改用完全排序的键并使用范围查询进行筛选。 |
| top |
integer (int32) |
要检索的搜索结果数。 这可以与$skip结合使用来实现搜索结果的客户端分页。 如果由于服务器端分页而截断结果,响应将包含一个延续标记,该标记可用于发出下一页结果的另一个搜索请求。 |
| vectorFilterMode |
确定是在执行矢量搜索之前还是之后应用过滤器。 新索引的默认值为“preFilter”。 |
|
| vectorQueries | VectorQuery[]: |
矢量和混合搜索查询的查询参数。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
请求已成功。 |
|
| Other Status Codes |
成功 |
|
| Other Status Codes |
意外的错误响应。 |
安全性
api-key
类型:
apiKey
在:
header
OAuth2Auth
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
作用域
| 名称 | 说明 |
|---|---|
| https://search.azure.com/.default |
示例
|
Search |
|
Search |
SearchIndexSearchDocumentsPost
示例请求
POST https://exampleservice.search.windows.net/indexes('test-index')/docs/search.post.search?api-version=2026-04-01
{
"count": true,
"facets": [
"ownerId",
"price,metric:sum,default:10"
],
"filter": "category eq 'purple' or category eq 'pink'",
"highlight": "category",
"highlightPostTag": "</em>",
"highlightPreTag": "</em>",
"minimumCoverage": 100,
"queryType": "semantic",
"scoringStatistics": "global",
"sessionId": "mysessionid",
"scoringParameters": [
"categoryTag:desiredCategoryValue"
],
"scoringProfile": "stringFieldBoost",
"debug": "vector",
"search": "purple",
"searchFields": "id,name,description,category,ownerId",
"searchMode": "any",
"select": "id,name,description,category,ownerId",
"skip": 0,
"top": 10,
"semanticConfiguration": "testconfig",
"semanticErrorHandling": "partial",
"semanticMaxWaitInMilliseconds": 5000,
"semanticQuery": "find all purple",
"answers": "extractive",
"captions": "extractive",
"vectorQueries": [
{
"vector": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"kind": "vector",
"k": 50,
"fields": "vector22, vector1b",
"oversampling": 20,
"weight": 1
}
],
"vectorFilterMode": "preFilter"
}
示例响应
{
"@odata.count": 27,
"@search.coverage": 100,
"@search.facets": {
"ownerId": [
{
"count": 16,
"value": "sam"
},
{
"count": 8,
"value": "ryan"
},
{
"count": 3,
"value": "benny"
}
],
"price": [
{
"sum": 320
}
]
},
"@search.answers": [],
"value": [
{
"@search.score": 0.015625,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.7178425788879395,
"@search.rerankerBoostedScore": 1.7178425788879395,
"@search.captions": [
{
"text": "test10 hello.",
"highlights": ""
}
],
"id": "10",
"name": "test",
"description": "test10 hello",
"category": "purple",
"ownerId": "benny"
},
{
"@search.score": 0.012820512987673283,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.7079174518585205,
"@search.rerankerBoostedScore": 1.7079174518585205,
"@search.captions": [
{
"text": "no vector.",
"highlights": "</em>no vector.</em>"
}
],
"id": "empty-vectors",
"name": "test",
"description": "no vector",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.011627906933426857,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.7079174518585205,
"@search.rerankerBoostedScore": 1.7079174518585205,
"@search.captions": [
{
"text": "no vector.",
"highlights": "</em>no vector.</em>"
}
],
"id": "no-vectors",
"name": "test",
"description": "no vector",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.011904762126505375,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6994102001190186,
"@search.rerankerBoostedScore": 1.6994102001190186,
"@search.captions": [
{
"text": "test4 hello.",
"highlights": ""
}
],
"id": "4",
"name": "test",
"description": "test4 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.012345679104328156,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6937386989593506,
"@search.rerankerBoostedScore": 1.6937386989593506,
"@search.captions": [
{
"text": "test2 hello.",
"highlights": ""
}
],
"id": "2",
"name": "test",
"description": "test2 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.0117647061124444,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6923208236694336,
"@search.rerankerBoostedScore": 1.6923208236694336,
"@search.captions": [
{
"text": "test5 hello.",
"highlights": ""
}
],
"id": "5",
"name": "test",
"description": "test5 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.01666666753590107,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.691611886024475,
"@search.rerankerBoostedScore": 1.691611886024475,
"@search.captions": [
{
"text": "test7 hello.",
"highlights": ""
}
],
"id": "7",
"name": "test",
"description": "test7 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.013698630034923553,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6781420707702637,
"@search.rerankerBoostedScore": 1.6781420707702637,
"@search.captions": [
{
"text": "test0 hello.",
"highlights": ""
}
],
"id": "0",
"name": "test",
"description": "test0 hello",
"category": "purple",
"ownerId": "benny"
},
{
"@search.score": 0.013888888992369175,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6653810739517212,
"@search.rerankerBoostedScore": 1.6653810739517212,
"@search.captions": [
{
"text": "test8 hello.",
"highlights": ""
}
],
"id": "8",
"name": "test",
"description": "test8 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.012658228166401386,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6618363857269287,
"@search.rerankerBoostedScore": 1.6618363857269287,
"@search.captions": [
{
"text": "test11 hello.",
"highlights": ""
}
],
"id": "11",
"name": "test",
"description": "test11 hello",
"category": "purple",
"ownerId": "sam"
}
]
}
{
"@odata.count": 27,
"@search.coverage": 100,
"@search.facets": {
"ownerId": [
{
"count": 16,
"value": "sam"
},
{
"count": 8,
"value": "ryan"
},
{
"count": 3,
"value": "benny"
}
],
"price": [
{
"sum": 320
}
]
},
"@search.answers": [],
"value": [
{
"@search.score": 0.015625,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.7178425788879395,
"@search.rerankerBoostedScore": 1.7178425788879395,
"@search.captions": [
{
"text": "test10 hello.",
"highlights": ""
}
],
"id": "10",
"name": "test",
"description": "test10 hello",
"category": "purple",
"ownerId": "benny"
},
{
"@search.score": 0.012820512987673283,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.7079174518585205,
"@search.rerankerBoostedScore": 1.7079174518585205,
"@search.captions": [
{
"text": "no vector.",
"highlights": "</em>no vector.</em>"
}
],
"id": "empty-vectors",
"name": "test",
"description": "no vector",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.011627906933426857,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.7079174518585205,
"@search.rerankerBoostedScore": 1.7079174518585205,
"@search.captions": [
{
"text": "no vector.",
"highlights": "</em>no vector.</em>"
}
],
"id": "no-vectors",
"name": "test",
"description": "no vector",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.011904762126505375,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6994102001190186,
"@search.rerankerBoostedScore": 1.6994102001190186,
"@search.captions": [
{
"text": "test4 hello.",
"highlights": ""
}
],
"id": "4",
"name": "test",
"description": "test4 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.012345679104328156,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6937386989593506,
"@search.rerankerBoostedScore": 1.6937386989593506,
"@search.captions": [
{
"text": "test2 hello.",
"highlights": ""
}
],
"id": "2",
"name": "test",
"description": "test2 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.0117647061124444,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6923208236694336,
"@search.rerankerBoostedScore": 1.6923208236694336,
"@search.captions": [
{
"text": "test5 hello.",
"highlights": ""
}
],
"id": "5",
"name": "test",
"description": "test5 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.01666666753590107,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.691611886024475,
"@search.rerankerBoostedScore": 1.691611886024475,
"@search.captions": [
{
"text": "test7 hello.",
"highlights": ""
}
],
"id": "7",
"name": "test",
"description": "test7 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.013698630034923553,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6781420707702637,
"@search.rerankerBoostedScore": 1.6781420707702637,
"@search.captions": [
{
"text": "test0 hello.",
"highlights": ""
}
],
"id": "0",
"name": "test",
"description": "test0 hello",
"category": "purple",
"ownerId": "benny"
},
{
"@search.score": 0.013888888992369175,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6653810739517212,
"@search.rerankerBoostedScore": 1.6653810739517212,
"@search.captions": [
{
"text": "test8 hello.",
"highlights": ""
}
],
"id": "8",
"name": "test",
"description": "test8 hello",
"category": "purple",
"ownerId": "sam"
},
{
"@search.score": 0.012658228166401386,
"@search.highlights": {
"category": [
"</em>purple</em>"
]
},
"@search.rerankerScore": 1.6618363857269287,
"@search.rerankerBoostedScore": 1.6618363857269287,
"@search.captions": [
{
"text": "This is a caption from the document.",
"highlights": "This is a <em>caption</em> from the document."
}
],
"id": "11",
"name": "test",
"description": "test11 hello",
"category": "purple",
"ownerId": "sam"
}
]
}
SearchIndexSearchDocumentsSemanticPost
示例请求
POST https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2026-04-01
{
"count": true,
"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
"queryType": "semantic",
"search": "how do clouds form",
"semanticConfiguration": "my-semantic-config",
"answers": "extractive|count-3",
"captions": "extractive|highlight-true",
"semanticErrorHandling": "partial",
"semanticMaxWaitInMilliseconds": 780
}
示例响应
{
"@odata.count": 25,
"@search.answers": [
{
"key": "4123",
"text": "Sunlight heats the land all day, warming that moist air and causing it to rise high into the atmosphere until it cools and condenses into water droplets. Clouds generally form where air is ascending (over land in this case), but not where it is descending (over the river).",
"highlights": "Sunlight heats the land all day, warming that moist air and causing it to rise high into the atmosphere until it cools and condenses into water droplets. Clouds generally form<em> where air is ascending</em> (over land in this case), but not where it is<em> descending</em> (over the river).",
"score": 0.94639826
}
],
"@search.nextPageParameters": {
"count": true,
"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
"queryType": "semantic",
"search": "how do clouds form",
"semanticConfiguration": "my-semantic-config",
"answers": "extractive|count-3",
"captions": "extractive|highlight-true",
"semanticErrorHandling": "partial",
"semanticMaxWaitInMilliseconds": 780,
"skip": 2,
"top": 8
},
"value": [
{
"@search.score": 0.5479723,
"@search.rerankerScore": 1.0321671911515296,
"@search.captions": [
{
"text": "Like all clouds, it forms when the air reaches its dew point—the temperature at which an air mass is cool enough for its water vapor to condense into liquid droplets. This false-color image shows valley fog, which is common in the Pacific Northwest of North America.",
"highlights": "Like all<em> clouds</em>, it<em> forms</em> when the air reaches its dew point—the temperature at which an air mass is cool enough for its water vapor to condense into liquid droplets. This false-color image shows valley<em> fog</em>, which is common in the Pacific Northwest of North America."
}
],
"id": "4123",
"title": "Earth Atmosphere",
"content": "Fog is essentially a cloud lying on the ground. Like all clouds, it forms when the air reaches its dew point—the temperature at \n\nwhich an air mass is cool enough for its water vapor to condense into liquid droplets.\n\nThis false-color image shows valley fog, which is common in the Pacific Northwest of North America. On clear winter nights, the \n\nground and overlying air cool off rapidly, especially at high elevations. Cold air is denser than warm air, and it sinks down into the \n\nvalleys. The moist air in the valleys gets chilled to its dew point, and fog forms. If undisturbed by winds, such fog may persist for \n\ndays. The Terra satellite captured this image of foggy valleys northeast of Vancouver in February 2010.\n\n\n",
"locations": [
"Pacific Northwest",
"North America",
"Vancouver"
]
}
],
"@odata.nextLink": "https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2026-04-01"
}
{
"@odata.count": 25,
"@search.answers": [
{
"key": "4123",
"text": "Sunlight heats the land all day, warming that moist air and causing it to rise high into the atmosphere until it cools and condenses into water droplets. Clouds generally form where air is ascending (over land in this case), but not where it is descending (over the river).",
"highlights": "Sunlight heats the land all day, warming that moist air and causing it to rise high into the atmosphere until it cools and condenses into water droplets. Clouds generally form<em> where air is ascending</em> (over land in this case), but not where it is<em> descending</em> (over the river).",
"score": 0.94639826
}
],
"@search.nextPageParameters": {
"count": true,
"highlightPostTag": "</em>",
"highlightPreTag": "<em>",
"queryType": "semantic",
"search": "how do clouds form",
"semanticConfiguration": "my-semantic-config",
"answers": "extractive|count-3",
"captions": "extractive|highlight-true",
"semanticErrorHandling": "partial",
"semanticMaxWaitInMilliseconds": 780,
"skip": 2,
"top": 8
},
"value": [
{
"@search.score": 0.5479723,
"@search.rerankerScore": 1.0321671911515296,
"@search.captions": [
{
"text": "Like all clouds, it forms when the air reaches its dew point—the temperature at which an air mass is cool enough for its water vapor to condense into liquid droplets. This false-color image shows valley fog, which is common in the Pacific Northwest of North America.",
"highlights": "Like all<em> clouds</em>, it<em> forms</em> when the air reaches its dew point—the temperature at which an air mass is cool enough for its water vapor to condense into liquid droplets. This false-color image shows valley<em> fog</em>, which is common in the Pacific Northwest of North America."
}
],
"id": "4123",
"title": "Earth Atmosphere",
"content": "Fog is essentially a cloud lying on the ground. Like all clouds, it forms when the air reaches its dew point—the temperature at \n\nwhich an air mass is cool enough for its water vapor to condense into liquid droplets.\n\nThis false-color image shows valley fog, which is common in the Pacific Northwest of North America. On clear winter nights, the \n\nground and overlying air cool off rapidly, especially at high elevations. Cold air is denser than warm air, and it sinks down into the \n\nvalleys. The moist air in the valleys gets chilled to its dew point, and fog forms. If undisturbed by winds, such fog may persist for \n\ndays. The Terra satellite captured this image of foggy valleys northeast of Vancouver in February 2010.\n\n\n",
"locations": [
"Pacific Northwest",
"North America",
"Vancouver"
]
}
],
"@odata.nextLink": "https://myservice.search.windows.net/indexes('myindex')/docs/search.post.search?api-version=2026-04-01"
}
定义
| 名称 | 说明 |
|---|---|
| Accept |
接受(Accept)首部。 |
|
Document |
包含可用于进一步浏览搜索结果的调试信息。 |
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
所有 Azure 资源管理器 API 的通用错误响应,用于返回失败操作的错误细节。 (这也遵循 OData 错误响应格式)。 |
|
Query |
答案是从与查询匹配的最相关文档的内容中提取的文本段落。 答案是从排名靠前的搜索结果中提取的。 对考生进行评分,并且选择了排名靠前的答案。 |
|
Query |
仅当查询类型为 |
|
Query |
标题是文档相对于搜索查询最具代表性的段落。 它们通常用作文档摘要。 仅返回 |
|
Query |
仅当查询类型为 |
|
Query |
启用可用于进一步探索搜索结果的调试工具。 您可以通过使用 |字符,例如:semantic|queryRewrites。 |
|
Query |
本文档的搜索查询的文本和矢量查询组件之间的子分数细分。 每个向量查询都以相同的顺序显示为单独的对象。 |
|
Query |
指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”,如果不需要查询语法,请使用“semantic”。 |
|
Scoring |
一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。 |
|
Search |
包含索引搜索结果的响应。 |
|
Search |
指定是否必须匹配任何或所有搜索词才能将文档计为匹配项。 |
|
Search |
用于筛选、排序、分面、分页和其他搜索查询行为的参数。 |
|
Search |
包含搜索查询找到的文档,以及关联的元数据。 |
|
Semantic |
允许用户选择语义调用是否完全失败,或返回部分结果。 |
|
Semantic |
为语义排名请求返回部分响应的原因。 |
|
Semantic |
为语义排名请求返回的部分响应类型。 |
|
Single |
单个向量字段结果。 两者都有 |
|
Text |
查询文本部分的 BM25 或经典分数。 |
|
Vector |
确定是在执行矢量搜索之前还是之后应用过滤器。 |
|
Vectorizable |
提供需要矢量化的图像的 base 64 编码二进制文件时,用于矢量搜索的查询参数。 |
|
Vectorizable |
提供表示需要矢量化的图像值的 URL 时用于矢量搜索的查询参数。 |
|
Vectorizable |
提供需要矢量化的文本值时用于矢量搜索的查询参数。 |
|
Vectorized |
提供原始向量值时用于矢量搜索的查询参数。 |
|
Vector |
正在执行的矢量查询类型。 |
|
Vectors |
“包含针对矢量搜索和混合搜索的调试信息。” |
Accept
接受(Accept)首部。
| 值 | 说明 |
|---|---|
| application/json;odata.metadata=none |
DocumentDebugInfo
包含可用于进一步浏览搜索结果的调试信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| vectors |
包含特定于矢量和混合搜索的调试信息。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
附加信息。 |
|
| type |
string |
附加信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
所有 Azure 资源管理器 API 的通用错误响应,用于返回失败操作的错误细节。 (这也遵循 OData 错误响应格式)。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
QueryAnswerResult
答案是从与查询匹配的最相关文档的内容中提取的文本段落。 答案是从排名靠前的搜索结果中提取的。 对考生进行评分,并且选择了排名靠前的答案。
| 名称 | 类型 | 说明 |
|---|---|---|
| highlights |
string |
与 Text 属性中的文本段落相同,其中突出显示的文本短语与查询最相关的文本短语。 |
| key |
string |
从中提取答案的文档的键。 |
| score |
number (double) |
分数值表示答案与查询相对于为查询返回的其他答案的相关性。 |
| text |
string |
从文档内容中提取的文本段落作为答案。 |
QueryAnswerType
仅当查询类型为 semantic. 如果设置,查询将返回从排名最高的文档中的关键段落中提取的答案。 可以通过在 answers 参数值后附加管道字符 | 后跟 count-<number of answers> 选项(例如 extractive|count-3)来配置返回的答案数。 默认计数为 1。 可以通过在 answers 参数值后附加管道字符 | 后跟 threshold-<confidence threshold> 选项(例如 extractive|threshold-0.9)来配置置信度阈值。 默认阈值为 0.7。 答案的最大字符长度可以通过附加管道字符“|”后跟“最大字符长度<的计数>数”来配置,例如“extractive|maxcharlength-600”。
| 值 | 说明 |
|---|---|
| none |
不要返回查询的答案。 |
| extractive |
从以自然语言表示的查询中返回的文档内容中提取答案候选项。 |
QueryCaptionResult
标题是文档相对于搜索查询最具代表性的段落。 它们通常用作文档摘要。 仅返回 semantic类型的查询的标题。
| 名称 | 类型 | 说明 |
|---|---|---|
| highlights |
string |
与 Text 属性中的文本段落相同,其中突出显示的短语与查询最相关的短语。 |
| text |
string |
从文档中提取的与搜索查询最相关的代表性文本段落。 |
QueryCaptionType
仅当查询类型为 semantic. 如果已设置,查询将返回从排名最高的文档中的关键段落中提取的标题。 当“字幕”设置为 extractive时,默认情况下会启用高亮显示,并且可以通过附加管道字符 | 后跟 highlight-<true/false> 选项(例如 extractive|highlight-true)来配置。 默认值为 None. 可以通过附加管道字符“|”后跟“最大字符长度<的计数>数”来配置字幕的最大字符长度,例如“extractive|maxcharlength-600”。
| 值 | 说明 |
|---|---|
| none |
不要返回查询的标题。 |
| extractive |
从匹配的文档中提取标题,其中包含与搜索查询相关的段落。 |
QueryDebugMode
启用可用于进一步探索搜索结果的调试工具。 您可以通过使用 |字符,例如:semantic|queryRewrites。
| 值 | 说明 |
|---|---|
| disabled |
不会返回查询调试信息。 |
| semantic |
允许用户进一步探索其重新添加的结果。 |
| vector |
允许用户进一步探索其混合查询和矢量查询结果。 |
| queryRewrites |
允许用户浏览为其搜索请求生成的查询重写列表。 |
| innerHits |
允许用户检索有关复杂类型集合中匹配的向量的评分信息。 |
| all |
打开所有调试选项。 |
QueryResultDocumentSubscores
本文档的搜索查询的文本和矢量查询组件之间的子分数细分。 每个向量查询都以相同的顺序显示为单独的对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| documentBoost |
number (double) |
查询文本部分的 BM25 或经典分数。 |
| text |
查询文本部分的 BM25 或经典分数。 |
|
| vectors |
<string,
Single |
向量相似度和 |
QueryType
指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”,如果不需要查询语法,请使用“semantic”。
| 值 | 说明 |
|---|---|
| simple |
使用简单的查询语法进行搜索。 搜索文本使用允许 +、* 和“”等符号的简单查询语言进行解释。 默认情况下,查询会跨所有可搜索字段进行评估,除非指定了 searchFields 参数。 |
| full |
使用完整的 Lucene 查询语法进行搜索。 使用 Lucene 查询语言解释搜索文本,该语言允许特定于字段的加权搜索以及其他高级功能。 |
| semantic |
最适合用自然语言而不是关键字表达的查询。 通过使用在 Web 语料库上训练的排名模型对排名靠前的搜索结果进行重新排名,提高搜索结果的精度。 |
ScoringStatistics
一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。
| 值 | 说明 |
|---|---|
| local |
评分统计信息将在本地计算,以降低延迟。 |
| global |
评分统计数据将全局计算,以获得更一致的评分。 |
SearchDocumentsResult
包含索引搜索结果的响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| @odata.count |
integer (int64) |
搜索作找到的结果总数,如果未请求计数,则为 null。 如果存在,则计数可能大于此响应中的结果数。 如果使用 $top 或 $skip 参数,或者查询无法在单个响应中返回所有请求的文档,则可能会发生这种情况。 |
| @odata.nextLink |
string |
当查询无法在单个响应中返回所有请求的结果时,返回延续 URL。 您可以使用此 URL 制定另一个 GET 或 POST 搜索请求,以获取搜索响应的下一部分。 确保使用与生成此响应的请求相同的谓词(GET 或 POST)。 |
| @search.answers |
搜索作的答案查询结果;如果未指定 answers 查询参数或设置为“none”,则为 null。 |
|
| @search.coverage |
number (double) |
一个值,指示查询中包含的索引百分比;如果未在请求中指定 minimumCoverage,则为 null。 |
| @search.facets |
object |
搜索作的分面查询结果,组织为每个分面字段的存储桶集合;如果查询不包含任何分面表达式,则为 null。 |
| @search.nextPageParameters |
当查询无法在单个响应中返回所有请求的结果时,返回延续 JSON 有效负载。 你可以同时使用这个 JSON |
|
| @search.semanticPartialResponseReason |
为语义排名请求返回部分响应的原因。 |
|
| @search.semanticPartialResponseType |
为语义排名请求返回的部分响应类型。 |
|
| value |
查询返回的结果序列。 |
SearchMode
指定是否必须匹配任何或所有搜索词才能将文档计为匹配项。
| 值 | 说明 |
|---|---|
| any |
必须匹配任何搜索词才能将文档计为匹配项。 |
| all |
必须匹配所有搜索词才能将文档计为匹配项。 |
SearchRequest
用于筛选、排序、分面、分页和其他搜索查询行为的参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| answers |
一个值,该值指定是否应作为搜索响应的一部分返回答案。 |
|
| captions |
一个值,该值指定是否应返回标题作为搜索响应的一部分。 |
|
| count |
boolean |
一个值,该值指定是否提取结果总数。 默认值为 false。 将此值设置为 true 可能会影响性能。 请注意,返回的计数是近似值。 |
| debug |
启用调试工具,可用于进一步探索重新排名的结果。 |
|
| facets |
string[] |
要应用于搜索查询的分面表达式列表。 每个分面表达式都包含一个字段名称,可以选择后跟逗号分隔的名称:值对列表。 |
| filter |
string |
要应用于搜索查询的 OData $filter表达式。 |
| highlight |
string |
用于命中突出显示的字段名称的逗号分隔列表。 只能使用可搜索字段进行命中突出显示。 |
| highlightPostTag |
string |
追加到命中突出显示的字符串标记。 必须使用 highlightPreTag 进行设置。 默认值为 /em <>。 |
| highlightPreTag |
string |
前面追加的字符串标记以命中突出显示。 必须使用 highlightPostTag 进行设置。 默认值为 em<>。 |
| minimumCoverage |
number (double) |
介于 0 和 100 之间的数字,指示搜索查询必须涵盖的索引百分比,以便将查询报告为成功。 此参数可用于确保仅包含一个副本的服务的搜索可用性。 默认值为 100。 |
| orderby |
string |
以逗号分隔的 OData $orderby表达式列表,用于对结果进行排序。 每个表达式可以是字段名称,也可以是对 geo.distance() 或 search.score() 函数的调用。 每个表达式后跟 asc 以指示升序,或 desc 表示降序。 默认值为升序。 关系将由匹配文档的分数中断。 如果未指定$orderby,则默认排序顺序按文档匹配分数降序。 最多可以有 32 个$orderby子句。 |
| queryType |
一个值,指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”。 |
|
| scoringParameters |
string[] |
在评分函数(例如 referencePointParameter)中使用格式名称值的参数值列表。 例如,如果计分配置文件使用名为“mylocation”的参数定义函数,则参数字符串将为“mylocation--122.2,44.8”(不含引号)。 |
| scoringProfile |
string |
要评估匹配文档的匹配分数的计分配置文件的名称,以便对结果进行排序。 |
| scoringStatistics |
一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。 |
|
| search |
string |
全文搜索查询表达式;使用“*”或省略此参数以匹配所有文档。 |
| searchFields |
string |
要限定全文搜索范围的字段名称的逗号分隔列表。 在完整的 Lucene 查询中使用字段搜索(fieldName:searchExpression),每个字段搜索表达式的字段名称优先于此参数中列出的任何字段名称。 |
| searchMode |
一个值,该值指定是否必须匹配任何搜索词或全部搜索词,以便将文档计数为匹配项。 |
|
| select |
string |
要检索的字段的逗号分隔列表。 如果未指定,则包含标记为在架构中可检索的所有字段。 |
| semanticConfiguration |
string |
处理类型语义查询的文档时将使用的语义配置的名称。 |
| semanticErrorHandling |
允许用户选择语义调用是完全失败(默认/当前行为)还是返回部分结果。 |
|
| semanticMaxWaitInMilliseconds |
integer (int32) minimum: 700 |
允许用户在请求失败之前设置语义扩充完成处理所需的时间上限。 |
| semanticQuery |
string |
允许设置单独的搜索查询,该查询将仅用于语义重排、语义标题和语义答案。 对于需要在基础检索和排名阶段和 L2 语义阶段之间使用不同的查询的情况,非常有用。 |
| sessionId |
string |
用于创建粘性会话的值,有助于获得更一致的结果。 只要使用了同一 sessionId,就会尝试以相同的副本集为目标。 谨慎地重复使用相同的 sessionID 值可能会干扰跨副本的请求负载均衡,并对搜索服务的性能产生不利影响。 用作 sessionId 的值不能以“_”字符开头。 |
| skip |
integer (int32) |
要跳过的搜索结果数。 此值不能大于 100,000。 如果需要按顺序扫描文档,但由于此限制而无法使用 skip,请考虑改用完全排序的键并使用范围查询进行筛选。 |
| top |
integer (int32) |
要检索的搜索结果数。 这可以与$skip结合使用来实现搜索结果的客户端分页。 如果由于服务器端分页而截断结果,响应将包含一个延续标记,该标记可用于发出下一页结果的另一个搜索请求。 |
| vectorFilterMode |
确定是在执行矢量搜索之前还是之后应用过滤器。 新索引的默认值为“preFilter”。 |
|
| vectorQueries | VectorQuery[]: |
矢量和混合搜索查询的查询参数。 |
SearchResult
包含搜索查询找到的文档,以及关联的元数据。
| 名称 | 类型 | 说明 |
|---|---|---|
| @search.captions |
标题是文档相对于搜索查询最具代表性的段落。 它们通常用作文档摘要。 仅针对类型为“语义”的查询返回字幕。 |
|
| @search.documentDebugInfo |
包含可用于进一步浏览搜索结果的调试信息。 |
|
| @search.highlights |
object |
文档中指示匹配搜索词的文本片段,按每个适用字段组织;null 如果未为查询启用命中突出显示。 |
| @search.rerankerBoostedScore |
number (double) |
通过提升 Reranker 分数计算的相关性分数。 搜索结果根据语义配置中的 useScoringProfileBoostedRanking 按 RerankerScore/RerankerBoostedScore 排序。RerankerBoostedScore仅在“语义”类型的查询时返回。 |
| @search.rerankerScore |
number (double) |
语义排名器为排名靠前的搜索结果计算的相关性分数。 搜索结果首先按 RerankerScore 排序,然后按分数排序。 RerankerScore 仅针对类型为“semantic”的查询返回。 |
| @search.score |
number (double) |
文档与查询返回的其他文档相比的相关性分数。 |
SemanticErrorMode
允许用户选择语义调用是否完全失败,或返回部分结果。
| 值 | 说明 |
|---|---|
| partial |
如果语义处理失败,部分结果仍返回。 部分结果的定义取决于语义步骤失败的原因和失败的原因。 |
| fail |
如果在语义处理步骤中出现异常,查询将失败并返回相应的 HTTP 代码,具体取决于错误。 |
SemanticErrorReason
为语义排名请求返回部分响应的原因。
| 值 | 说明 |
|---|---|
| maxWaitExceeded |
如果设置了 |
| capacityOverloaded |
请求受到限制。 仅返回基本结果。 |
| transient |
语义进程的至少一个步骤失败。 |
SemanticSearchResultsType
为语义排名请求返回的部分响应类型。
| 值 | 说明 |
|---|---|
| baseResults |
不带任何语义扩充或重新调整的结果。 |
| rerankedResults |
已使用重新曲柄模型重新调整结果,并包含语义标题。 它们不会包含任何答案、答案突出显示或标题突出显示。 |
SingleVectorFieldResult
单个向量字段结果。 两者都有
| 名称 | 类型 | 说明 |
|---|---|---|
| searchScore |
number (double) |
The |
| vectorSimilarity |
number (double) |
本文档的向量相似性分数。 请注意,这是相似性指标的规范定义,而不是“距离”版本。 例如,余弦相似度而不是余弦距离。 |
TextResult
查询文本部分的 BM25 或经典分数。
| 名称 | 类型 | 说明 |
|---|---|---|
| searchScore |
number (double) |
查询文本部分的 BM25 或经典分数。 |
VectorFilterMode
确定是在执行矢量搜索之前还是之后应用过滤器。
| 值 | 说明 |
|---|---|
| postFilter |
返回候选矢量结果集后,将应用筛选器。 根据筛选器选择性,这可能会导致结果少于参数“k”请求的结果。 |
| preFilter |
筛选器将在搜索查询之前应用。 |
| strictPostFilter |
在返回全局前 k 个候选向量结果集后,将应用过滤器。 这将导致的结果少于参数“k”请求的结果。 |
VectorizableImageBinaryQuery
提供需要矢量化的图像的 base 64 编码二进制文件时,用于矢量搜索的查询参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| base64Image |
string |
要矢量化的图像的基数 64 编码二进制文件以执行矢量搜索查询。 |
| exhaustive |
boolean |
如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。 |
| fields |
string |
要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。 |
| k |
integer (int32) |
要作为热门命中返回的最近的邻居数。 |
| kind |
string:
image |
查询类型。 |
| oversampling |
number (double) |
过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。 |
| weight |
number (float) |
与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。 |
VectorizableImageUrlQuery
提供表示需要矢量化的图像值的 URL 时用于矢量搜索的查询参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| exhaustive |
boolean |
如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。 |
| fields |
string |
要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。 |
| k |
integer (int32) |
要作为热门命中返回的最近的邻居数。 |
| kind |
string:
image |
查询类型。 |
| oversampling |
number (double) |
过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。 |
| url |
string |
要矢量化的图像的 URL,用于执行矢量搜索查询。 |
| weight |
number (float) |
与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。 |
VectorizableTextQuery
提供需要矢量化的文本值时用于矢量搜索的查询参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| exhaustive |
boolean |
如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。 |
| fields |
string |
要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。 |
| k |
integer (int32) |
要作为热门命中返回的最近的邻居数。 |
| kind |
string:
text |
查询类型。 |
| oversampling |
number (double) |
过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。 |
| text |
string |
要进行矢量化以执行矢量搜索查询的文本。 |
| weight |
number (float) |
与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。 |
VectorizedQuery
提供原始向量值时用于矢量搜索的查询参数。
| 名称 | 类型 | 说明 |
|---|---|---|
| exhaustive |
boolean |
如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。 |
| fields |
string |
要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。 |
| k |
integer (int32) |
要作为热门命中返回的最近的邻居数。 |
| kind |
string:
vector |
查询类型。 |
| oversampling |
number (double) |
过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。 |
| vector |
number[] (float) |
搜索查询的向量表示形式。 |
| weight |
number (float) |
与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。 |
VectorQueryKind
正在执行的矢量查询类型。
| 值 | 说明 |
|---|---|
| vector |
提供原始向量值的矢量查询。 |
| text |
向量查询,其中提供了需要矢量化的文本值。 |
| imageUrl |
矢量查询,其中提供了表示需要矢量化的图像值的 url。 |
| imageBinary |
矢量查询,其中提供了需要矢量化的图像的基数 64 编码二进制文件。 |
VectorsDebugInfo
“包含针对矢量搜索和混合搜索的调试信息。”
| 名称 | 类型 | 说明 |
|---|---|---|
| subscores |
在选择结果集融合/组合方法(例如 RRF)之前文档的子分数细分。 |