Documents - Get
インデックスからドキュメントを取得します。
GET {endpoint}/indexes('{indexName}')/docs('{key}')?api-version=2023-11-01
GET {endpoint}/indexes('{indexName}')/docs('{key}')?$select={$select}&api-version=2023-11-01
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
検索サービスのエンドポイント URL。 |
|
index
|
path | True |
string |
インデックスの名前。 |
|
key
|
path | True |
string |
取得するドキュメントのキー。 |
|
api-version
|
query | True |
string |
クライアント API のバージョン。 |
|
$select
|
query |
string[] |
ドキュメント用に取得するフィールド名の一覧。取得されないフィールドは、返されたドキュメントに表示されません。 |
要求ヘッダー
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| x-ms-client-request-id |
string (uuid) |
デバッグに役立つ要求と共に送信される追跡 ID。 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 200 OK |
Lookup |
要求されたドキュメントを含む応答。 |
| Other Status Codes |
エラー応答。 |
例
SearchIndexGetDocument
要求のサンプル
GET https://myservice.search.windows.net/indexes('myindex')/docs('1')?$select=docId,title,description&api-version=2023-11-01
応答のサンプル
{
"description": "Cheapest hotel in town",
"docId": "1",
"title": "Nice Hotel"
}
定義
SearchError
API のエラー条件について説明します。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
string |
サーバー定義の一連のエラー コードの 1 つ。 |
| details |
この報告されたエラーの原因となった特定のエラーに関する詳細の配列。 |
|
| message |
string |
エラーの人間が判読できる表現。 |