+1 对唐的评论。您将需要使用REST API或.NET SDK创建索引。如果您碰巧使用 PowerShell 创建服务,您可能会发现以下代码很有帮助,它使用 Invoke-RestMethod 和一组包含索引架构和一些文档的 .JSON 文件调用 REST API。
#------------------------#
# Setting up search index#
#------------------------#
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", 'application/json')
$headers.Add("api-key", $searchApiKey)
Write-Host
Write-Host "Creating Index..."
$schemaFile = "$(Split-Path $MyInvocation.MyCommand.Path)\zipcodes.schema"
$response = Invoke-RestMethod -TimeoutSec 10000 $searchServiceUrl"/indexes/zipcodes2?api-version=2015-02-28-Preview" -Method Put -Headers $headers -Body "$(get-content $schemaFile)"
Write-Host $response
$jsonFile = "$(Split-Path $MyInvocation.MyCommand.Path)\zipcodes1.json"
Write-Host
Write-Host "Adding Documents from $jsonFile..."
$response = Invoke-RestMethod -TimeoutSec 10000 $searchServiceUrl"/indexes/zipcodes2/docs/index?api-version=2015-02-28-Preview" -Method Post -Headers $headers -Body "$(get-content $jsonFile)"
Write-Host $response