你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。

Documents - Search Post

搜索索引中的文档。

POST {endpoint}/indexes('{indexName}')/docs/search.post.search?api-version=2025-11-01-preview

URI 参数

名称 在 必需 类型 说明
endpoint
path True

string (uri)

搜索服务的终结点 URL。

indexName
path True

string

索引的名称。

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

请求头

名称 必需 类型 说明
Accept

Accept

接受(Accept)首部。

x-ms-query-source-authorization

string

标识正在执行查询的用户的令牌。 此令牌用于对文档实施安全限制。

x-ms-enable-elevated-read

boolean

启用提升读取的值,该读取可绕过查询作的文档级权限检查。

x-ms-client-request-id

string (uuid)

请求的不透明、全局唯一的客户端生成的字符串标识符。

请求正文

名称 类型 说明
answers

QueryAnswerType

一个值,该值指定是否应作为搜索响应的一部分返回答案。

captions

QueryCaptionType

一个值,该值指定是否应返回标题作为搜索响应的一部分。

count

boolean

一个值,该值指定是否提取结果总数。 默认值为 false。 将此值设置为 true 可能会影响性能。 请注意,返回的计数是近似值。

debug

QueryDebugMode

启用调试工具,可用于进一步探索重新排名的结果。

facets

string[]

要应用于搜索查询的分面表达式列表。 每个分面表达式都包含一个字段名称,可以选择后跟逗号分隔的名称:值对列表。

filter

string

要应用于搜索查询的 OData $filter表达式。

highlight

string

用于命中突出显示的字段名称的逗号分隔列表。 只能使用可搜索字段进行命中突出显示。

highlightPostTag

string

追加到命中突出显示的字符串标记。 必须使用 highlightPreTag 进行设置。 默认值为 /em <>。

highlightPreTag

string

前面追加的字符串标记以命中突出显示。 必须使用 highlightPostTag 进行设置。 默认值为 em<>。

hybridSearch

HybridSearch

用于配置混合搜索行为的查询参数。

minimumCoverage

number (double)

介于 0 和 100 之间的数字,指示搜索查询必须涵盖的索引百分比,以便将查询报告为成功。 此参数可用于确保仅包含一个副本的服务的搜索可用性。 默认值为 100。

orderby

string

以逗号分隔的 OData $orderby表达式列表,用于对结果进行排序。 每个表达式可以是字段名称,也可以是对 geo.distance() 或 search.score() 函数的调用。 每个表达式后跟 asc 以指示升序,或 desc 表示降序。 默认值为升序。 关系将由匹配文档的分数中断。 如果未指定$orderby,则默认排序顺序按文档匹配分数降序。 最多可以有 32 个$orderby子句。

queryLanguage

QueryLanguage

指定搜索查询语言的值。

queryRewrites

QueryRewritesType

指定是否应生成查询重写以扩充搜索查询的值。

queryType

QueryType

一个值,指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”。

scoringParameters

string[]

在评分函数(例如 referencePointParameter)中使用格式名称值的参数值列表。 例如,如果计分配置文件使用名为“mylocation”的参数定义函数,则参数字符串将为“mylocation--122.2,44.8”(不含引号)。

scoringProfile

string

要评估匹配文档的匹配分数的计分配置文件的名称,以便对结果进行排序。

scoringStatistics

ScoringStatistics

一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。

search

string

全文搜索查询表达式;使用“*”或省略此参数以匹配所有文档。

searchFields

string

要限定全文搜索范围的字段名称的逗号分隔列表。 在完整的 Lucene 查询中使用字段搜索(fieldName:searchExpression),每个字段搜索表达式的字段名称优先于此参数中列出的任何字段名称。

searchMode

SearchMode

一个值,该值指定是否必须匹配任何搜索词或全部搜索词,以便将文档计数为匹配项。

select

string

要检索的字段的逗号分隔列表。 如果未指定,则包含标记为在架构中可检索的所有字段。

semanticConfiguration

string

在处理语义类型查询的文档时将使用的语义配置的名称。

semanticErrorHandling

SemanticErrorMode

允许用户选择语义调用是完全失败(默认/当前行为)还是返回部分结果。

semanticFields

string

用于语义排名的字段名称的逗号分隔列表。

semanticMaxWaitInMilliseconds

integer (int32)

minimum: 700

允许用户设置语义扩充在请求失败之前完成处理所需的时间上限。

semanticQuery

string

允许设置单独的搜索查询,该查询将仅用于语义重新排名、语义标题和语义答案。 对于需要在基本检索和排名阶段以及 L2 语义阶段之间使用不同查询的方案非常有用。

sessionId

string

用于创建粘性会话的值,有助于获得更一致的结果。 只要使用了同一 sessionId,就会尝试以相同的副本集为目标。 谨慎地重复使用相同的 sessionID 值可能会干扰跨副本的请求负载均衡,并对搜索服务的性能产生不利影响。 用作 sessionId 的值不能以“_”字符开头。

skip

integer (int32)

要跳过的搜索结果数。 此值不能大于 100,000。 如果需要按顺序扫描文档,但由于此限制而无法使用 skip,请考虑改用完全排序的键并使用范围查询进行筛选。

speller

QuerySpellerType

一个值,指定拼写者用来纠正单个搜索词的类型。

top

integer (int32)

要检索的搜索结果数。 这可以与$skip结合使用来实现搜索结果的客户端分页。 如果由于服务器端分页而截断结果,响应将包含一个延续标记,该标记可用于发出下一页结果的另一个搜索请求。

vectorFilterMode

VectorFilterMode

确定是在执行矢量搜索之前还是之后应用过滤器。 新索引的默认值为“preFilter”。

vectorQueries VectorQuery[]:

矢量和混合搜索查询的查询参数。

响应

名称 类型 说明
200 OK

SearchDocumentsResult

请求已成功。

Other Status Codes

SearchDocumentsResult

成功

Other Status Codes

ErrorResponse

意外错误响应。

安全性

api-key

类型: apiKey
在: header

OAuth2Auth

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

作用域

名称 说明
https://search.azure.com/.default

示例

SearchIndexSearchDocumentsPost
SearchIndexSearchDocumentsSemanticPost

SearchIndexSearchDocumentsPost

示例请求

POST https://previewexampleservice.search.windows.net/indexes('preview-test')/docs/search.post.search?api-version=2025-11-01-preview




{
  "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",
  "queryLanguage": "en-us",
  "speller": "lexicon",
  "select": "id,name,description,category,ownerId",
  "skip": 0,
  "top": 10,
  "semanticConfiguration": "testconfig",
  "semanticErrorHandling": "partial",
  "semanticMaxWaitInMilliseconds": 5000,
  "semanticQuery": "find all purple",
  "answers": "extractive",
  "captions": "extractive",
  "queryRewrites": "generative",
  "vectorQueries": [
    {
      "vector": [
        0,
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9
      ],
      "kind": "vector",
      "k": 50,
      "fields": "vector22, vector1b",
      "oversampling": 20,
      "weight": 1,
      "threshold": {
        "value": 0.984,
        "kind": "vectorSimilarity"
      },
      "filterOverride": "ownerId eq 'sam'"
    }
  ],
  "vectorFilterMode": "preFilter",
  "hybridSearch": {
    "maxTextRecallSize": 100,
    "countAndFacetMode": "countAllResults"
  }
}

示例响应

{
  "@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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 27.725889205932617
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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>"
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 21.559860229492188
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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>"
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 39.23316955566406
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 21.559860229492188
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 23.01456642150879
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 27.725889205932617
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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>"
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 21.559860229492188
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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>"
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 39.23316955566406
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 21.559860229492188
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 23.01456642150879
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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": ""
        }
      ],
      "@search.documentDebugInfo": {
        "vectors": {
          "subscores": {
            "documentBoost": 1,
            "text": {
              "searchScore": 6.500757217407227
            },
            "vectors": [
              {}
            ]
          }
        }
      },
      "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=2025-11-01-preview

{
  "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=2025-05-01-preview"
}
{
  "@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=2025-05-01-preview"
}

定义

名称 说明
Accept

接受(Accept)首部。

DebugInfo

包含可用于进一步浏览搜索结果的调试信息。

DocumentDebugInfo

包含可用于进一步浏览搜索结果的调试信息。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

所有 Azure 资源管理器 API 的通用错误响应,用于返回失败操作的错误细节。 (这也遵循 OData 错误响应格式)。

HybridCountAndFacetMode

确定计数和分面是否应包括与搜索查询匹配的所有文档,还是仅包括在“maxTextRecallSize”窗口中检索的文档。 默认值为“countAllResults”。

HybridSearch

用于配置混合搜索行为的查询参数。

QueryAnswerResult

答案是从与查询匹配的最相关文档的内容中提取的文本段落。 答案是从排名靠前的搜索结果中提取的。 对考生进行评分,并且选择了排名靠前的答案。

QueryAnswerType

仅当查询类型为 semantic. 如果设置,则查询将返回从排名最高的文档中的关键段落中提取的答案。 可以通过在 answers 参数值后附加管道字符 | 后跟 count-<number of answers> 选项(例如 extractive|count-3)来配置返回的答案数。 默认计数为 1。 可以通过在 answers 参数值后附加管道字符 | 后跟 threshold-<confidence threshold> 选项(例如 extractive|threshold-0.9)来配置置信度阈值。 默认阈值为 0.7。 答案的最大字符长度可以通过附加管道字符“|”后跟“最大字符长度<的计数>数”来配置,例如“extractive|maxcharlength-600”。

QueryCaptionResult

标题是文档相对于搜索查询最具代表性的段落。 它们通常用作文档摘要。 仅返回 semantic类型的查询的标题。

QueryCaptionType

仅当查询类型为 semantic. 如果已设置,查询将返回从排名最高的文档中的关键段落中提取的标题。 当“字幕”设置为 extractive时,默认情况下会启用高亮显示,并且可以通过附加管道字符 | 后跟 highlight-<true/false> 选项(例如 extractive|highlight-true)来配置。 默认为 None。 可以通过附加管道字符“|”后跟“最大字符长度<的计数>数”来配置字幕的最大字符长度,例如“extractive|maxcharlength-600”。

QueryDebugMode

启用可用于进一步探索搜索结果的调试工具。 您可以通过使用 |字符,例如:semantic|queryRewrites。

QueryLanguage

查询的语言。

QueryResultDocumentRerankerInput

发送到语义扩充过程的原始串联字符串。

QueryResultDocumentSemanticField

发送到语义扩充过程的字段的说明以及它们的使用方式

QueryResultDocumentSubscores

本文档的搜索查询的文本和矢量查询组件之间的子分数细分。 每个向量查询都以相同的顺序显示为单独的对象。

QueryRewritesDebugInfo

包含特定于查询重写的调试信息。

QueryRewritesType

仅当查询类型为 semantic. 当 QueryRewrites 设置为 generative时,查询术语将发送到生成模型,该模型将生成 10 次(默认)重写,以帮助提高请求的召回率。 可以通过附加管道字符 | 后跟 count-<number of rewrites> 选项(例如 generative|count-3)来配置请求的计数。 默认为 None。

QueryRewritesValuesDebugInfo

包含特定于查询重写的调试信息。

QuerySpellerType

通过拼写更正单个搜索查询词来提高搜索召回率。

QueryType

指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”,如果不需要查询语法,请使用“semantic”。

ScoringStatistics

一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。

SearchDocumentsResult

包含索引搜索结果的响应。

SearchMode

指定是否必须匹配任何或所有搜索词才能将文档计为匹配项。

SearchRequest

用于筛选、排序、分面、分页和其他搜索查询行为的参数。

SearchResult

包含搜索查询找到的文档,以及关联的元数据。

SearchScoreThreshold

向量查询的结果将根据 '

SemanticDebugInfo

包含特定于语义排名请求的调试信息。

SemanticErrorMode

允许用户选择语义调用是否完全失败,或返回部分结果。

SemanticErrorReason

为语义排名请求返回部分响应的原因。

SemanticFieldState

该字段在语义丰富过程中的使用方式。

SemanticQueryRewritesResultType

用于此请求的查询重写类型。

SemanticSearchResultsType

为语义排名请求返回的部分响应类型。

SingleVectorFieldResult

单个向量字段结果。 两者

TextResult

查询文本部分的 BM25 或经典分数。

VectorFilterMode

确定是在执行矢量搜索之前还是之后应用过滤器。

VectorizableImageBinaryQuery

提供需要矢量化的图像的 base 64 编码二进制文件时,用于矢量搜索的查询参数。

VectorizableImageUrlQuery

提供表示需要矢量化的图像值的 URL 时用于矢量搜索的查询参数。

VectorizableTextQuery

提供需要矢量化的文本值时用于矢量搜索的查询参数。

VectorizedQuery

提供原始向量值时用于矢量搜索的查询参数。

VectorQueryKind

正在执行的矢量查询类型。

VectorsDebugInfo

“包含针对矢量搜索和混合搜索的调试信息。”

VectorSimilarityThreshold

将基于矢量相似性指标筛选矢量查询的结果。 请注意,这是相似性指标的规范定义,而不是“距离”版本。 将根据字段使用的指标自动选择阈值方向(较大或更小)。

VectorThresholdKind

那种用于过滤向量查询的阈值。

Accept

接受(Accept)首部。

值 说明
application/json;odata.metadata=none

DebugInfo

包含可用于进一步浏览搜索结果的调试信息。

名称 类型 说明
queryRewrites

QueryRewritesDebugInfo

包含特定于查询重写的调试信息。

DocumentDebugInfo

包含可用于进一步浏览搜索结果的调试信息。

名称 类型 说明
innerHits

object

包含特定于复杂类型集合中匹配的向量的调试信息。

semantic

SemanticDebugInfo

包含特定于语义排名请求的调试信息。

vectors

VectorsDebugInfo

包含特定于矢量和混合搜索的调试信息。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

附加信息。

type

string

附加信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

所有 Azure 资源管理器 API 的通用错误响应,用于返回失败操作的错误细节。 (这也遵循 OData 错误响应格式)。

名称 类型 说明
error

ErrorDetail

错误对象。

HybridCountAndFacetMode

确定计数和分面是否应包括与搜索查询匹配的所有文档,还是仅包括在“maxTextRecallSize”窗口中检索的文档。 默认值为“countAllResults”。

值 说明
countRetrievableResults

在计算“count”和“facets”时,仅包括在“maxTextRecallSize”检索窗口中匹配的文档。

countAllResults

在计算“计数”和“分面”时包括搜索查询匹配的所有文档,无论这些文档是否在“maxTextRecallSize”检索窗口内。

HybridSearch

用于配置混合搜索行为的查询参数。

名称 类型 说明
countAndFacetMode

HybridCountAndFacetMode

确定计数和分面是否应包括与搜索查询匹配的所有文档,还是仅包括在“maxTextRecallSize”窗口中检索的文档。

maxTextRecallSize

integer (int32)

确定混合搜索请求的文本查询部分要检索的最大文档数。 这些文档将与与向量查询匹配的文档组合在一起,以生成单个最终结果列表。 选择较大的 maxTextRecallSize 值将允许检索和分页更多文档(使用 top 和 skip 参数),但代价是资源利用率更高,延迟时间更高。 该值需要介于 1 到 10,000 之间。 默认值为 1000。

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

打开所有调试选项。

QueryLanguage

查询的语言。

值 说明
none

未指定查询语言。

en-us

查询英语语言值(美国)。

en-gb

查询英语(英国)的语言值。

en-in

查询英语(印度)的语言值。

en-ca

查询英语(加拿大)的语言值。

en-au

查询英语(澳大利亚)的语言值。

fr-fr

法语(法国)的查询语言值。

fr-ca

法语(加拿大)的查询语言值。

de-de

查询德语(德国)的语言值。

es-es

查询西班牙语(西班牙)的语言值。

es-mx

查询西班牙语(墨西哥)的语言值。

zh-cn

中文(中国)的查询语言值。

zh-tw

查询中文(台湾)的语言值。

pt-br

葡萄牙语(巴西)的查询语言值。

pt-pt

葡萄牙语(葡萄牙)的查询语言值。

it-it

查询意大利语(意大利)的语言值。

ja-jp

查询日语(日本)的语言值。

ko-kr

查询韩语(韩国)的语言值。

ru-ru

俄语(俄罗斯)的查询语言值。

cs-cz

查询捷克语(捷克共和国)的语言值。

nl-be

荷兰语(比利时)的查询语言值。

nl-nl

查询荷兰语(荷兰)的语言值。

hu-hu

查询匈牙利语(匈牙利)的语言值。

pl-pl

查询波兰语(波兰)的语言值。

sv-se

瑞典语(瑞典)的查询语言值。

tr-tr

查询土耳其语(土耳其)的语言值。

hi-in

印地语(印度)的查询语言值。

ar-sa

查询阿拉伯语(沙特阿拉伯)的语言值。

ar-eg

查询阿拉伯语(埃及)的语言值。

ar-ma

查询阿拉伯语(摩洛哥)的语言值。

ar-kw

查询阿拉伯语(科威特)的语言值。

ar-jo

查询阿拉伯语(约旦)的语言值。

da-dk

丹麦语(丹麦)的查询语言值。

no-no

查询挪威语(挪威)的语言值。

bg-bg

查询保加利亚语(保加利亚)的语言值。

hr-hr

查询克罗地亚语 (Croatia) 的语言值。

hr-ba

查询克罗地亚语(波斯尼亚和黑塞哥维那)的语言值。

ms-my

查询马来语(马来西亚)的语言值。

ms-bn

查询马来语(文莱达鲁萨兰国)的语言值。

sl-sl

查询斯洛文尼亚语(斯洛文尼亚)的语言值。

ta-in

泰米尔语(印度)的查询语言值。

vi-vn

查询越南语(越南)的语言值。

el-gr

查询希腊语(希腊)的语言值。

ro-ro

查询罗马尼亚语(罗马尼亚)的语言值。

is-is

查询冰岛语(冰岛)的语言值。

id-id

查询印度尼西亚语(印度尼西亚)的语言值。

th-th

查询泰语(泰国)的语言值。

lt-lt

查询立陶宛语 (Lithuania) 的语言值。

uk-ua

查询乌克兰语 (乌克兰) 的语言值。

lv-lv

查询拉脱维亚语(拉脱维亚)的语言值。

et-ee

查询爱沙尼亚语(爱沙尼亚)的语言值。

ca-es

查询加泰罗尼亚语的语言值。

fi-fi

查询芬兰语(芬兰)的语言值。

sr-ba

查询塞尔维亚语(波斯尼亚和黑塞哥维那)的语言值。

sr-me

查询塞尔维亚语(黑山)的语言值。

sr-rs

查询塞尔维亚语(塞尔维亚)的语言值。

sk-sk

查询斯洛伐克语(斯洛伐克)的语言值。

nb-no

查询挪威语(挪威)的语言值。

hy-am

查询亚美尼亚语(亚美尼亚)的语言值。

bn-in

孟加拉语(印度)的查询语言值。

eu-es

查询巴斯克语的语言值。

gl-es

查询加利西亚语的语言值。

gu-in

古吉拉特语(印度)的查询语言值。

he-il

查询希伯来语(以色列)的语言值。

ga-ie

查询爱尔兰语(爱尔兰)的语言值。

kn-in

查询卡纳达语(印度)的语言值。

ml-in

查询马拉雅拉姆语(印度)的语言值。

mr-in

查询马拉地语(印度)的语言值。

fa-ae

查询波斯语 (UAE) 的语言值。

pa-in

旁遮普语(印度)的查询语言值。

te-in

泰卢固语(印度)的查询语言值。

ur-pk

查询乌尔都语(巴基斯坦)的语言值。

QueryResultDocumentRerankerInput

发送到语义扩充过程的原始串联字符串。

名称 类型 说明
content

string

用于语义扩充的内容字段的原始串联字符串。

keywords

string

用于语义扩充的关键字字段的原始串联字符串。

title

string

用于语义扩充的标题字段的原始字符串。

QueryResultDocumentSemanticField

发送到语义扩充过程的字段的说明以及它们的使用方式

名称 类型 说明
name

string

发送到语义扩充过程的字段的名称

state

SemanticFieldState

字段用于语义丰富过程的方式(完全使用、部分使用或未使用)

QueryResultDocumentSubscores

本文档的搜索查询的文本和矢量查询组件之间的子分数细分。 每个向量查询都以相同的顺序显示为单独的对象。

名称 类型 说明
documentBoost

number (double)

查询文本部分的 BM25 或经典分数。

text

TextResult

查询文本部分的 BM25 或经典分数。

vectors

<string,  SingleVectorFieldResult>

向量相似度和

QueryRewritesDebugInfo

包含特定于查询重写的调试信息。

名称 类型 说明
text

QueryRewritesValuesDebugInfo

为文本查询生成的查询重写列表。

vectors

QueryRewritesValuesDebugInfo[]

为可矢量化文本查询生成的查询重写列表。

QueryRewritesType

仅当查询类型为 semantic. 当 QueryRewrites 设置为 generative时,查询术语将发送到生成模型,该模型将生成 10 次(默认)重写,以帮助提高请求的召回率。 可以通过附加管道字符 | 后跟 count-<number of rewrites> 选项(例如 generative|count-3)来配置请求的计数。 默认为 None。

值 说明
none

不要为此查询生成其他查询重写。

generative

生成替代查询词以增加搜索请求的召回率。

QueryRewritesValuesDebugInfo

包含特定于查询重写的调试信息。

名称 类型 说明
inputQuery

string

生成式查询重写模型的输入文本。 在某些情况下,用户查询和生成模型的输入可能不相同。

rewrites

string[]

查询重写列表。

QuerySpellerType

通过拼写更正单个搜索查询词来提高搜索召回率。

值 说明
none

拼写检查器未启用。

lexicon

拼写检查器使用 queryLanguage 参数指定的语言的静态词典更正单个查询术语。

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

QueryAnswerResult[]

搜索操作的答案查询结果;如果未指定 answers 查询参数或设置为“none”,则为 null。

@search.coverage

number (double)

一个值,指示查询中包含的索引百分比;如果未在请求中指定 minimumCoverage,则为 null。

@search.debug

DebugInfo

调试应用于整个搜索结果的信息。

@search.facets

object

搜索操作的分面查询结果,组织为每个分面字段的存储桶集合;如果查询不包含任何分面表达式,则为 null。

@search.nextPageParameters

SearchRequest

当查询无法在单个响应中返回所有请求的结果时,返回延续 JSON 有效负载。 你可以同时使用这个 JSON

@search.semanticPartialResponseReason

SemanticErrorReason

为语义排名请求返回部分响应的原因。

@search.semanticPartialResponseType

SemanticSearchResultsType

为语义排名请求返回的部分响应类型。

@search.semanticQueryRewritesResultType

SemanticQueryRewritesResultType

用于检索文档的查询重写类型。

value

SearchResult[]

查询返回的结果序列。

SearchMode

指定是否必须匹配任何或所有搜索词才能将文档计为匹配项。

值 说明
any

必须匹配任何搜索词才能将文档计为匹配项。

all

必须匹配所有搜索词才能将文档计为匹配项。

SearchRequest

用于筛选、排序、分面、分页和其他搜索查询行为的参数。

名称 类型 说明
answers

QueryAnswerType

一个值,该值指定是否应作为搜索响应的一部分返回答案。

captions

QueryCaptionType

一个值,该值指定是否应返回标题作为搜索响应的一部分。

count

boolean

一个值,该值指定是否提取结果总数。 默认值为 false。 将此值设置为 true 可能会影响性能。 请注意,返回的计数是近似值。

debug

QueryDebugMode

启用调试工具,可用于进一步探索重新排名的结果。

facets

string[]

要应用于搜索查询的分面表达式列表。 每个分面表达式都包含一个字段名称,可以选择后跟逗号分隔的名称:值对列表。

filter

string

要应用于搜索查询的 OData $filter表达式。

highlight

string

用于命中突出显示的字段名称的逗号分隔列表。 只能使用可搜索字段进行命中突出显示。

highlightPostTag

string

追加到命中突出显示的字符串标记。 必须使用 highlightPreTag 进行设置。 默认值为 /em <>。

highlightPreTag

string

前面追加的字符串标记以命中突出显示。 必须使用 highlightPostTag 进行设置。 默认值为 em<>。

hybridSearch

HybridSearch

用于配置混合搜索行为的查询参数。

minimumCoverage

number (double)

介于 0 和 100 之间的数字,指示搜索查询必须涵盖的索引百分比,以便将查询报告为成功。 此参数可用于确保仅包含一个副本的服务的搜索可用性。 默认值为 100。

orderby

string

以逗号分隔的 OData $orderby表达式列表,用于对结果进行排序。 每个表达式可以是字段名称,也可以是对 geo.distance() 或 search.score() 函数的调用。 每个表达式后跟 asc 以指示升序,或 desc 表示降序。 默认值为升序。 关系将由匹配文档的分数中断。 如果未指定$orderby,则默认排序顺序按文档匹配分数降序。 最多可以有 32 个$orderby子句。

queryLanguage

QueryLanguage

指定搜索查询语言的值。

queryRewrites

QueryRewritesType

指定是否应生成查询重写以扩充搜索查询的值。

queryType

QueryType

一个值,指定搜索查询的语法。 默认值为“simple”。 如果查询使用 Lucene 查询语法,请使用“full”。

scoringParameters

string[]

在评分函数(例如 referencePointParameter)中使用格式名称值的参数值列表。 例如,如果计分配置文件使用名为“mylocation”的参数定义函数,则参数字符串将为“mylocation--122.2,44.8”(不含引号)。

scoringProfile

string

要评估匹配文档的匹配分数的计分配置文件的名称,以便对结果进行排序。

scoringStatistics

ScoringStatistics

一个值,该值指定是全局计算计分统计信息(如文档频率),以更一致评分,还是在本地计算延迟较低。 默认值为“local”。 在评分之前,使用“global”全局汇总评分统计信息。 使用全局评分统计信息可能会增加搜索查询的延迟。

search

string

全文搜索查询表达式;使用“*”或省略此参数以匹配所有文档。

searchFields

string

要限定全文搜索范围的字段名称的逗号分隔列表。 在完整的 Lucene 查询中使用字段搜索(fieldName:searchExpression),每个字段搜索表达式的字段名称优先于此参数中列出的任何字段名称。

searchMode

SearchMode

一个值,该值指定是否必须匹配任何搜索词或全部搜索词,以便将文档计数为匹配项。

select

string

要检索的字段的逗号分隔列表。 如果未指定,则包含标记为在架构中可检索的所有字段。

semanticConfiguration

string

在处理语义类型查询的文档时将使用的语义配置的名称。

semanticErrorHandling

SemanticErrorMode

允许用户选择语义调用是完全失败(默认/当前行为)还是返回部分结果。

semanticFields

string

用于语义排名的字段名称的逗号分隔列表。

semanticMaxWaitInMilliseconds

integer (int32)

minimum: 700

允许用户设置语义扩充在请求失败之前完成处理所需的时间上限。

semanticQuery

string

允许设置单独的搜索查询,该查询将仅用于语义重新排名、语义标题和语义答案。 对于需要在基本检索和排名阶段以及 L2 语义阶段之间使用不同查询的方案非常有用。

sessionId

string

用于创建粘性会话的值,有助于获得更一致的结果。 只要使用了同一 sessionId,就会尝试以相同的副本集为目标。 谨慎地重复使用相同的 sessionID 值可能会干扰跨副本的请求负载均衡,并对搜索服务的性能产生不利影响。 用作 sessionId 的值不能以“_”字符开头。

skip

integer (int32)

要跳过的搜索结果数。 此值不能大于 100,000。 如果需要按顺序扫描文档,但由于此限制而无法使用 skip,请考虑改用完全排序的键并使用范围查询进行筛选。

speller

QuerySpellerType

一个值,指定拼写者用来纠正单个搜索词的类型。

top

integer (int32)

要检索的搜索结果数。 这可以与$skip结合使用来实现搜索结果的客户端分页。 如果由于服务器端分页而截断结果,响应将包含一个延续标记,该标记可用于发出下一页结果的另一个搜索请求。

vectorFilterMode

VectorFilterMode

确定是在执行矢量搜索之前还是之后应用过滤器。 新索引的默认值为“preFilter”。

vectorQueries VectorQuery[]:

矢量和混合搜索查询的查询参数。

SearchResult

包含搜索查询找到的文档,以及关联的元数据。

名称 类型 说明
@search.captions

QueryCaptionResult[]

标题是文档相对于搜索查询最具代表性的段落。 它们通常用作文档摘要。 仅针对类型为“语义”的查询返回字幕。

@search.documentDebugInfo

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)

文档与查询返回的其他文档相比的相关性分数。

SearchScoreThreshold

向量查询的结果将根据 '

名称 类型 说明
kind string:

searchScore

门槛的类型。

value

number (double)

阈值会根据 '

SemanticDebugInfo

包含特定于语义排名请求的调试信息。

名称 类型 说明
contentFields

QueryResultDocumentSemanticField[]

发送到语义扩充过程的内容字段,以及它们的使用方式

keywordFields

QueryResultDocumentSemanticField[]

发送到语义扩充过程的关键字字段,以及它们的使用方式

rerankerInput

QueryResultDocumentRerankerInput

发送到语义扩充过程的原始串联字符串。

titleField

QueryResultDocumentSemanticField

发送到语义扩充过程的标题字段及其使用方式

SemanticErrorMode

允许用户选择语义调用是否完全失败,或返回部分结果。

值 说明
partial

如果语义处理失败,部分结果仍会返回。 部分结果的定义取决于失败的语义步骤以及失败的原因是什么。

fail

如果在语义处理步骤中出现异常,查询将失败,并根据错误返回相应的 HTTP 代码。

SemanticErrorReason

为语义排名请求返回部分响应的原因。

值 说明
maxWaitExceeded

如果已设置,并且 semanticMaxWaitInMilliseconds 语义处理持续时间超过该值。 仅返回基本结果。

capacityOverloaded

请求受到限制。 仅返回基本结果。

transient

语义过程的至少一个步骤失败了。

SemanticFieldState

该字段在语义丰富过程中的使用方式。

值 说明
used

该字段被充分利用用于语义丰富。

unused

该字段未用于语义丰富。

partial

该字段部分用于语义丰富。

SemanticQueryRewritesResultType

用于此请求的查询重写类型。

值 说明
originalQueryOnly

未成功为此请求生成查询重写。 仅使用原始查询来检索结果。

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)类型的向量字段。

filterOverride

string

要应用于此特定向量查询的 OData 筛选器表达式。 如果未在向量级别定义筛选器表达式,则改用在顶级筛选器参数中定义的表达式。

k

integer (int32)

要作为热门命中返回的最近的邻居数。

kind string:

imageBinary

查询类型。

oversampling

number (double)

过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。

perDocumentVectorLimit

integer (int32)

控制矢量搜索查询中每个文档可以匹配多少向量。 将其设置为 1 可确保每个文档最多匹配一个向量,从而保证结果来自不同的文档。 将其设置为 0(无限制)允许匹配同一文档中的多个相关向量。 默认为 0。

threshold VectorThreshold:

用于矢量查询的阈值。 请注意,仅当所有“字段”都使用相同的相似性指标时,才能设置此值。

weight

number (float)

与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。

VectorizableImageUrlQuery

提供表示需要矢量化的图像值的 URL 时用于矢量搜索的查询参数。

名称 类型 说明
exhaustive

boolean

如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。

fields

string

要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。

filterOverride

string

要应用于此特定向量查询的 OData 筛选器表达式。 如果未在向量级别定义筛选器表达式,则改用在顶级筛选器参数中定义的表达式。

k

integer (int32)

要作为热门命中返回的最近的邻居数。

kind string:

imageUrl

查询类型。

oversampling

number (double)

过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。

perDocumentVectorLimit

integer (int32)

控制矢量搜索查询中每个文档可以匹配多少向量。 将其设置为 1 可确保每个文档最多匹配一个向量,从而保证结果来自不同的文档。 将其设置为 0(无限制)允许匹配同一文档中的多个相关向量。 默认为 0。

threshold VectorThreshold:

用于矢量查询的阈值。 请注意,仅当所有“字段”都使用相同的相似性指标时,才能设置此值。

url

string

要矢量化的图像的 URL,用于执行矢量搜索查询。

weight

number (float)

与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。

VectorizableTextQuery

提供需要矢量化的文本值时用于矢量搜索的查询参数。

名称 类型 说明
exhaustive

boolean

如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。

fields

string

要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。

filterOverride

string

要应用于此特定向量查询的 OData 筛选器表达式。 如果未在向量级别定义筛选器表达式,则改用在顶级筛选器参数中定义的表达式。

k

integer (int32)

要作为热门命中返回的最近的邻居数。

kind string:

text

查询类型。

oversampling

number (double)

过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。

perDocumentVectorLimit

integer (int32)

控制矢量搜索查询中每个文档可以匹配多少向量。 将其设置为 1 可确保每个文档最多匹配一个向量,从而保证结果来自不同的文档。 将其设置为 0(无限制)允许匹配同一文档中的多个相关向量。 默认为 0。

queryRewrites

QueryRewritesType

可配置为让生成模型在将查询发送到矢量化之前重写查询。

text

string

要进行矢量化以执行矢量搜索查询的文本。

threshold VectorThreshold:

用于矢量查询的阈值。 请注意,仅当所有“字段”都使用相同的相似性指标时,才能设置此值。

weight

number (float)

与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。

VectorizedQuery

提供原始向量值时用于矢量搜索的查询参数。

名称 类型 说明
exhaustive

boolean

如果为 true,则触发矢量索引中所有向量中最接近的邻域搜索。 对于精确匹配至关重要的方案(例如确定基本真相值)非常有用。

fields

string

要包含在搜索矢量中的集合(Edm.Single)类型的向量字段。

filterOverride

string

要应用于此特定向量查询的 OData 筛选器表达式。 如果未在向量级别定义筛选器表达式,则改用在顶级筛选器参数中定义的表达式。

k

integer (int32)

要作为热门命中返回的最近的邻居数。

kind string:

vector

查询类型。

oversampling

number (double)

过度采样因子。 最小值为 1。 它替代索引定义中配置的“defaultOversampling”参数。 仅当“rerankWithOriginalVectors”为 true 时,才能设置它。 仅当在基础向量字段上使用压缩方法时,才允许此参数。

perDocumentVectorLimit

integer (int32)

控制矢量搜索查询中每个文档可以匹配多少向量。 将其设置为 1 可确保每个文档最多匹配一个向量,从而保证结果来自不同的文档。 将其设置为 0(无限制)允许匹配同一文档中的多个相关向量。 默认为 0。

threshold VectorThreshold:

用于矢量查询的阈值。 请注意,仅当所有“字段”都使用相同的相似性指标时,才能设置此值。

vector

number[] (float)

搜索查询的向量表示形式。

weight

number (float)

与同一搜索请求中的其他向量查询和/或文本查询相比,矢量查询的相对权重。 当合并由不同向量查询生成的多个排名列表的结果和/或通过文本查询检索的结果时,将使用此值。 权重越高,匹配该查询的文档将处于最终排名中。 默认值为 1.0,该值必须是大于零的正数。

VectorQueryKind

正在执行的矢量查询类型。

值 说明
vector

提供原始向量值的矢量查询。

text

矢量查询,其中提供了需要矢量化的文本值。

imageUrl

矢量查询,其中提供了表示需要矢量化的图像值的 url。

imageBinary

矢量查询,其中提供了需要矢量化的图像的基数 64 编码二进制文件。

VectorsDebugInfo

“包含针对矢量搜索和混合搜索的调试信息。”

名称 类型 说明
subscores

QueryResultDocumentSubscores

在选择结果集融合/组合方法(例如 RRF)之前文档的子分数细分。

VectorSimilarityThreshold

将基于矢量相似性指标筛选矢量查询的结果。 请注意,这是相似性指标的规范定义,而不是“距离”版本。 将根据字段使用的指标自动选择阈值方向(较大或更小)。

名称 类型 说明
kind string:

vectorSimilarity

门槛的类型。

value

number (double)

阈值将根据相似性指标值进行筛选。 请注意,这是相似性指标的规范定义,而不是“距离”版本。 将根据字段使用的指标自动选择阈值方向(较大或更小)。

VectorThresholdKind

那种用于过滤向量查询的阈值。

值 说明
vectorSimilarity

将基于矢量相似性指标筛选矢量查询的结果。 请注意,这是相似性指标的规范定义,而不是“距离”版本。 将根据字段使用的指标自动选择阈值方向(较大或更小)。

searchScore

矢量查询的结果将基于“@search.score”值进行筛选。 请注意,这是作为搜索响应的一部分返回的 @search.score。 将为更高的 @search.score选择阈值方向。