Skip to content

Commit 71db543

Browse files
committed
Corrected several copy-paste errors
1 parent 782eb7f commit 71db543

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

articles/search/search-get-started-python.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ ms.custom: devx-track-python, mode-api
2222
> * [Portal](search-get-started-portal.md)
2323
>
2424
25-
Build a Jupyter Notebook that creates, loads, and queries an Azure Cognitive Search index using Python and the [azure-search-documents library](/python/api/overview/azure/search-documents-readme) in the Azure SDK for Python. This article explains how to build a notebook step by step. Alternatively, you can [download and run a finished Jupyter Python notebook](https://github.com/Azure-Samples/azure-search-python-samples).
25+
In this exercise, build a Jupyter Notebook that creates, loads, and queries an Azure Cognitive Search index using Python and the [azure-search-documents library](/python/api/overview/azure/search-documents-readme) in the Azure SDK for Python. This article explains how to build a notebook step by step. Alternatively, you can [download and run a finished Jupyter Python notebook](https://github.com/Azure-Samples/azure-search-python-samples).
2626

2727
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
2828

2929
## Prerequisites
3030

31-
The following services and tools are required for this quickstart.
31+
The following services and tools are used in this quickstart.
3232

3333
* Visual Studio Code with the Python extension (or equivalent tool), with Python 3.7 or later
3434

@@ -38,24 +38,24 @@ The following services and tools are required for this quickstart.
3838

3939
## Copy a key and URL
4040

41-
REST calls require the service URL 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:
41+
To connect to your search service, provide the endpoint and an access key. 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:
4242

4343
1. [Sign in to the Azure portal](https://portal.azure.com/), and in your search service **Overview** page, get the URL. An example endpoint might look like `https://mydemo.search.windows.net`.
4444

4545
1. In **Settings** > **Keys**, get an admin key for full rights on the service. There are two interchangeable admin keys, provided for business continuity in case you need to roll one over. You can use either the primary or secondary key on requests for adding, modifying, and deleting objects.
4646

4747
![Get an HTTP endpoint and access key](media/search-get-started-rest/get-url-key.png "Get an HTTP endpoint and access key")
4848

49-
All requests require an api-key on every request sent to your service. Having a valid key establishes trust, on a per request basis, between the application sending the request and the service that handles it.
49+
You'll provide these values in the next section when you set up the connection.
5050

5151
## Connect to Azure Cognitive Search
5252

53-
In this task, start Jupyter Notebook and verify that you can connect to Azure Cognitive Search. You'll do this step by requesting a list of indexes from your service.
53+
In this task, create the notebook, load the libraries, and set up your clients.
5454

5555
1. Create a new Python3 notebook in Visual Studio Code:
5656

5757
1. Press F1 and search for "Python Select Interpreter" and choose a version of Python 3.7 or later.
58-
1. Press F1 again and search for "Create: New Jupyter Notebook". You should have an empty, untitled .ipynb file open in the editor ready for the first entry.
58+
1. Press F1 again and search for "Create: New Jupyter Notebook". You should have an empty, untitled `.ipynb` file open in the editor ready for the first entry.
5959

6060
1. In the first cell, load the libraries from the Azure SDK for Python, including [azure-search-documents](/python/api/azure-search-documents).
6161

@@ -78,7 +78,7 @@ In this task, start Jupyter Notebook and verify that you can connect to Azure Co
7878
)
7979
```
8080

81-
1. Add a second cell and paste in the input the request elements that will be constants on every request. Provide your search service name, admin API key, and query API key, copied in a previous step. This cell also sets up the clients you'll use for specific operations: [SearchIndexClient](/python/api/azure-search-documents/azure.search.documents.indexes.searchindexclient) to create an index, and [SearchClient](/python/api/azure-search-documents/azure.search.documents.searchclient) to query an index.
81+
1. Add a second cell and paste in the connection information. This cell also sets up the clients you'll use for specific operations: [SearchIndexClient](/python/api/azure-search-documents/azure.search.documents.indexes.searchindexclient) to create an index, and [SearchClient](/python/api/azure-search-documents/azure.search.documents.searchclient) to query an index.
8282

8383
```python
8484
service_name = "YOUR-SEARCH-SERVICE-NAME"
@@ -111,9 +111,9 @@ In this task, start Jupyter Notebook and verify that you can connect to Azure Co
111111

112112
## 1 - Create an index
113113

114-
Required elements of an index include a name, a fields collection, and a key. The fields collection defines the structure of a logical *search document*, used for both loading data and returning results.
114+
Required index elements include a name, a fields collection, and a document key that uniquely identifies each search document. The fields collection defines the structure of a logical *search document*, used for both loading data and returning results.
115115

116-
Each field has a name, type, and attributes that determine how the field is used (for example, whether it's full-text searchable, filterable, or retrievable in search results). Within an index, one of the fields of type `Edm.String` must be designated as the *key* for document identity.
116+
Within the fields collection, each field has a name, type, and attributes that determine how the field is used (for example, whether it's full-text searchable, filterable, or retrievable in search results). Within an index, one of the fields of type `Edm.String` must be designated as the *key* for document identity.
117117

118118
This index is named "hotels-quickstart" and has the field definitions you see below. It's a subset of a larger [Hotels index](https://github.com/Azure-Samples/azure-search-sample-data/blob/master/hotels/Hotels_IndexDefinition.JSON) used in other walkthroughs. We trimmed it in this quickstart for brevity.
119119

@@ -332,7 +332,7 @@ This step shows you how to query an index using the **search** method of the [se
332332
print("Category: {}".format(result["Category"]))
333333
```
334334

335-
1. In this example, we'll use the autocomplete function. Autocomplete is typically used in a search box to provide potential matches as the user types into the search box.
335+
1. In the last example, we'll use the autocomplete function. Autocomplete is typically used in a search box to provide potential matches as the user types into the search box.
336336

337337
When the index was created, a suggester named `sg` was also created as part of the request. A suggester definition specifies which fields can be used to find potential matches to suggester requests. In this example, those fields are 'Tags', 'Address/City', 'Address/Country'. To simulate auto-complete, pass in the letters "sa" as a partial string. The autocomplete method of [SearchClient](/python/api/azure-search-documents/azure.search.documents.searchclient) sends back potential term matches.
338338

@@ -355,7 +355,7 @@ If you're using a free service, remember that you're limited to three indexes, i
355355

356356
## Next steps
357357

358-
In this JavaScript quickstart, you worked through a series of tasks to create an index, load it with documents, and run queries. To continue learning, try the following tutorial.
358+
In this Python quickstart, you worked through the fundamental workflow using the azure.search.documents library from the Python SDK. You performed tasks that created an index, loaded it with documents, and ran queries. To continue learning, try the following tutorial.
359359

360360
> [!div class="nextstepaction"]
361361
> [Tutorial: Add search to web apps](tutorial-python-overview.md)

0 commit comments

Comments
 (0)