Documents - Count

Hiermee wordt het aantal documenten in de index opgevraagd.

GET {endpoint}/indexes('{indexName}')/docs/$count?api-version=2026-04-01

URI-parameters

Name In Vereist Type Description
endpoint
path True

string (uri)

De eindpunt-URL van de zoekservice.

indexName
path True

string

De naam van de index.

api-version
query True

string

minLength: 1

De API-versie die voor deze bewerking moet worden gebruikt.

Aanvraagkoptekst

Name Vereist Type Description
Accept

Accept

De Accepteer kop.

x-ms-client-request-id

string (uuid)

Een ondoorzichtige, wereldwijd unieke, door de client gegenereerde tekenreeks-id voor de aanvraag.

Antwoorden

Name Type Description
200 OK

integer

De aanvraag is voltooid.

Media Types: "text/plain; charset=utf-8", "application/json"

Other Status Codes

ErrorResponse

Een onverwachte foutreactie.

Media Types: "text/plain; charset=utf-8", "application/json"

Beveiliging

api-key

Type: apiKey
In: header

OAuth2Auth

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Bereiken

Name Description
https://search.azure.com/.default

Voorbeelden

SearchIndexCountDocuments

Voorbeeldaanvraag

GET https://exampleservice.search.windows.net/indexes('example-index')/docs/$count?api-version=2026-04-01

Voorbeeldrespons

50

Definities

Name Description
Accept

De Accepteer kop.

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

ErrorDetail

De foutdetails.

ErrorResponse

Veelvoorkomende foutrespons voor alle Azure Resource Manager API's om foutdetails terug te geven bij mislukte bewerkingen. (Dit volgt ook de OData-foutreactieindeling.)

Accept

De Accepteer kop.

Waarde Description
application/json;odata.metadata=none

ErrorAdditionalInfo

Aanvullende informatie over de resourcebeheerfout.

Name Type Description
info

De aanvullende informatie.

type

string

Het extra informatietype.

ErrorDetail

De foutdetails.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

De fout bevat aanvullende informatie.

code

string

De foutcode.

details

ErrorDetail[]

De foutdetails.

message

string

Het foutbericht.

target

string

Het foutdoelwit.

ErrorResponse

Veelvoorkomende foutrespons voor alle Azure Resource Manager API's om foutdetails terug te geven bij mislukte bewerkingen. (Dit volgt ook de OData-foutreactieindeling.)

Name Type Description
error

ErrorDetail

Het foutobject.