@@ -113,7 +113,7 @@ Begin by opening a Powershell console or other environment in which you've insta
113
113
114
114
```json
115
115
{
116
- "serviceName" : "[SERVICE_NAME ]",
116
+ "serviceName" : "[SEARCH_SERVICE_NAME ]",
117
117
"adminKey" : "[ADMIN_KEY]",
118
118
"queryKey" : "[QUERY_KEY]",
119
119
"indexName" : "hotels-quickstart"
@@ -404,7 +404,7 @@ The [**nconf** package](https://github.com/indexzero/nconf) allows you to specif
404
404
``` javascript
405
405
function getAzureConfiguration () {
406
406
const config = nconf .file ({ file: ' azure_search_config.json' });
407
- if (config .get (' serviceName' ) === ' [SEARCH_SERVICE_NAME' ) {
407
+ if (config .get (' serviceName' ) === ' [SEARCH_SERVICE_NAME] ' ) {
408
408
throw new Error (" You have not set the values in your azure_search_config.json file. Change them to match your search service's values." );
409
409
}
410
410
return config;
@@ -434,7 +434,7 @@ Finally, specify and call the main asynchronous `run` function. This function ca
434
434
const run = async () => {
435
435
try {
436
436
const cfg = getAzureConfiguration ();
437
- const client = new AzureSearchClient (cfg .get (" serviceName" ), cfg .get (" adminKey" ), cfg .get (" queryKey" ), cfg .get [ " serviceName " ] );
437
+ const client = new AzureSearchClient (cfg .get (" serviceName" ), cfg .get (" adminKey" ), cfg .get (" queryKey" ), cfg .get ( " indexName) );
438
438
439
439
const exists = await client.indexExistsAsync();
440
440
await exists ? client.deleteIndexAsync() : Promise.resolve();
0 commit comments