Documents - Get

インデックスからドキュメントを取得します。

GET {endpoint}/indexes('{indexName}')/docs('{key}')?api-version=2024-07-01
GET {endpoint}/indexes('{indexName}')/docs('{key}')?$select={$select}&api-version=2024-07-01

URI パラメーター

名前 / 必須 説明
endpoint
path True

string

検索サービスのエンドポイント URL。

indexName
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

LookupDocument

要求されたドキュメントを含む応答。

Other Status Codes

ErrorResponse

エラー応答。

SearchIndexGetDocument

要求のサンプル

GET https://exampleservice.search.windows.net/indexes('getdocumentexample')/docs('1')?$select=docId,title,description&api-version=2024-07-01

応答のサンプル

{
  "docId": "1",
  "title": "Nice Hotel",
  "description": "Cheapest hotel in town"
}

定義

名前 説明
ErrorAdditionalInfo

リソース管理エラーの追加情報。

ErrorDetail

エラーの詳細。

ErrorResponse

エラー応答

ErrorAdditionalInfo

リソース管理エラーの追加情報。

名前 説明
info

object

追加情報。

type

string

追加情報の種類。

ErrorDetail

エラーの詳細。

名前 説明
additionalInfo

ErrorAdditionalInfo[]

エラーの追加情報。

code

string

エラー コード。

details

ErrorDetail[]

エラーの詳細。

message

string

エラー メッセージ。

target

string

エラーターゲット。

ErrorResponse

エラー応答

名前 説明
error

ErrorDetail

エラー オブジェクト。