You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/search/search-get-started-nodejs.md
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.author: heidist
9
9
ms.devlang: nodejs
10
10
ms.service: cognitive-search
11
11
ms.topic: quickstart
12
-
ms.date: 11/04/2019
12
+
ms.date: 02/25/2020
13
13
---
14
14
# Quickstart: Create an Azure Cognitive Search index in Node.js using REST APIs
15
15
> [!div class="op_single_selector"]
@@ -20,25 +20,30 @@ ms.date: 11/04/2019
20
20
> *[Python](search-get-started-python.md)
21
21
> *[Postman](search-get-started-postman.md)
22
22
23
-
Create a Node.js application that that creates, loads, and queries an Azure Cognitive Search index. This article demonstrates how to create the application step-by-step. Alternately, you can [download the source code and data](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/master/quickstart/) and run the application from the command line.
23
+
Create a Node.js application that that creates, loads, and queries an Azure Cognitive Search index. This article demonstrates how to create the application step-by-step. Alternatively, you can [download the source code and data](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/master/quickstart/) and run the application from the command line.
24
24
25
25
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
26
26
27
27
## Prerequisites
28
28
29
-
The following services, tools, and data are used in this quickstart.
29
+
We used the following software and services to build and test this quickstart:
30
+
31
+
+[Node.js](https://nodejs.org)
32
+
33
+
+[NPM](https://www.npmjs.com) should be installed by Node.js
34
+
35
+
+ A sample index structure and matching documents are provided in this article, or from the [**quickstart** directory of the repo](https://github.com/Azure-Samples/azure-search-javascript-samples/)
30
36
31
-
+[Node.js](https://nodejs.org).
32
-
+[NPM](https://www.npmjs.com) should be installed by Node.js.
33
-
+ A sample index structure and matching documents are provided in this article, or from the [**quickstart** directory of the repo](https://github.com/Azure-Samples/azure-search-javascript-samples/).
34
37
+[Create an Azure Cognitive Search service](search-create-service-portal.md) or [find an existing service](https://ms.portal.azure.com/#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Search%2FsearchServices) under your current subscription. You can use a free service for this quickstart.
35
38
36
39
Recommended:
37
40
38
-
*[Visual Studio Code](https://code.visualstudio.com).
41
+
*[Visual Studio Code](https://code.visualstudio.com)
42
+
39
43
*[Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extensions for VSCode.
40
44
41
45
<aname="get-service-info"></a>
46
+
42
47
## Get keys and URLs
43
48
44
49
Calls to the service require a URL endpoint and an access key on every request. A search service is created with both, so if you added Azure Cognitive Search to your subscription, follow these steps to get the necessary information:
@@ -103,16 +108,17 @@ Begin by opening a Powershell console or other environment in which you've insta
103
108
}
104
109
}
105
110
```
106
-
Create a file **azure_search_config.json** to hold your search service data:
107
111
108
-
```json
109
-
{
110
-
"serviceName" : "[SERVICE_NAME]",
111
-
"adminKey" : "[ADMIN_KEY]",
112
-
"queryKey" : "[QUERY_KEY]",
113
-
"indexName" : "hotels-quickstart"
114
-
}
115
-
```
112
+
5. Create a file **azure_search_config.json** to hold your search service data:
113
+
114
+
```json
115
+
{
116
+
"serviceName" : "[SEARCH_SERVICE_NAME]",
117
+
"adminKey" : "[ADMIN_KEY]",
118
+
"queryKey" : "[QUERY_KEY]",
119
+
"indexName" : "hotels-quickstart"
120
+
}
121
+
```
116
122
117
123
Replace the `[SERVICE_NAME]` value with the name of your search service. Replace `[ADMIN_KEY]` and `[QUERY_KEY]` with the key values you recorded earlier.
118
124
@@ -398,7 +404,7 @@ The [**nconf** package](https://github.com/indexzero/nconf) allows you to specif
0 commit comments