Documents - Get
Dizinden bir belge alır.
GET {endpoint}/indexes('{indexName}')/docs('{key}')?api-version=2024-03-01-Preview
GET {endpoint}/indexes('{indexName}')/docs('{key}')?$select={$select}&api-version=2024-03-01-Preview
URI Parametreleri
| Name | İçinde | Gerekli | Tür | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
Arama hizmetinin uç nokta URL'si. |
|
index
|
path | True |
string |
Dizinin adı. |
|
key
|
path | True |
string |
Alınacak belgenin anahtarı. |
|
api-version
|
query | True |
string |
İstemci Api Sürümü. |
|
$select
|
query |
string[] |
Belge için alınacak alan adlarının listesi; Alınmayan herhangi bir alan, döndürülen belgede eksik olacaktır. |
İstek Başlığı
| Name | Gerekli | Tür | Description |
|---|---|---|---|
| x-ms-client-request-id |
string (uuid) |
Hata ayıklamaya yardımcı olmak için istekle birlikte gönderilen izleme kimliği. |
Yanıtlar
| Name | Tür | Description |
|---|---|---|
| 200 OK |
Lookup |
İstenen belgeyi içeren yanıt. |
| Other Status Codes |
Hata yanıtı. |
Örnekler
SearchIndexGetDocument
Örnek isteği
GET https://myservice.search.windows.net/indexes('myindex')/docs('1')?$select=docId,title,description&api-version=2024-03-01-Preview
Örnek yanıt
{
"description": "Cheapest hotel in town",
"docId": "1",
"title": "Nice Hotel"
}
Tanımlar
| Name | Description |
|---|---|
|
Error |
Kaynak yönetimi hatası ek bilgileri. |
|
Error |
Hata ayrıntısı. |
|
Error |
Hata yanıtı |
ErrorAdditionalInfo
Kaynak yönetimi hatası ek bilgileri.
| Name | Tür | Description |
|---|---|---|
| info |
object |
Ek bilgiler. |
| type |
string |
Ek bilgi türü. |
ErrorDetail
Hata ayrıntısı.
| Name | Tür | Description |
|---|---|---|
| additionalInfo |
Hata ek bilgileri. |
|
| code |
string |
Hata kodu. |
| details |
Hata ayrıntıları. |
|
| message |
string |
Hata iletisi. |
| target |
string |
Hata hedefi. |
ErrorResponse
Hata yanıtı
| Name | Tür | Description |
|---|---|---|
| error |
Hata nesnesi. |