Skip to content

Commit e60d358

Browse files
committed
updated an import statement for the semantic quickstart notebook
1 parent 9e7de5c commit e60d358

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

Quickstart-Semantic-Search/semantic-search-quickstart.ipynb

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"# Uncomment the next line if you need to install the azure-search-documents client library:\n",
26-
"%pip install azure-search-documents --pre\n",
25+
"# Import the libraries needed to create a search index, upload documents, and query the index\n",
26+
"%pip install azure-search-documents\n",
2727
"%pip show azure-search-documents\n",
2828
"%pip install python-dotenv\n",
2929
"\n",
@@ -33,7 +33,6 @@
3333
"from azure.search.documents import SearchClient\n",
3434
"from azure.search.documents.indexes.models import ( \n",
3535
" SearchIndex, \n",
36-
" SearchField, \n",
3736
" SearchFieldDataType, \n",
3837
" SimpleField, \n",
3938
" SearchableField,\n",
@@ -83,7 +82,7 @@
8382
"cell_type": "markdown",
8483
"metadata": {},
8584
"source": [
86-
"In the third cell, the index \"hotels-quickstart\" will be deleted if it previously existed."
85+
"In the next cell, the index \"hotels-quickstart\" will be deleted if it previously existed. This step allows you to reuse the index name."
8786
]
8887
},
8988
{
@@ -156,7 +155,7 @@
156155
"cell_type": "markdown",
157156
"metadata": {},
158157
"source": [
159-
"Formulate the create_index request. This request targets the indexes collection of your search service and creates an index based on the index schema you provided in the previous cell."
158+
"Formulate the create_index request. This request targets the indexes collection of your search service and creates an index using the index schema from the previous cell."
160159
]
161160
},
162161
{
@@ -184,7 +183,7 @@
184183
"cell_type": "markdown",
185184
"metadata": {},
186185
"source": [
187-
"Next, provide four documents that conform to the index schema. Specify an upload action for each document."
186+
"Next, set up documents to include four hotel documents conforming to the schema."
188187
]
189188
},
190189
{
@@ -278,7 +277,7 @@
278277
"cell_type": "markdown",
279278
"metadata": {},
280279
"source": [
281-
"Formulate the request. This upload_documents request targets the docs collection of the hotels-quickstart index and pushes the documents provided in the previous step into the search index."
280+
"Formulate the request. This upload_documents request targets the docs collection of the hotels-quickstart index and pushes the documents from the previous step into the search index."
282281
]
283282
},
284283
{
@@ -299,7 +298,7 @@
299298
"cell_type": "markdown",
300299
"metadata": {},
301300
"source": [
302-
"You are now ready to run some queries. For this operation, use search_client. \n",
301+
"You're now ready to run some queries. For this operation, use search_client. \n",
303302
"\n",
304303
"### Empty query with unscored results\n",
305304
"\n",
@@ -366,7 +365,7 @@
366365
"metadata": {},
367366
"outputs": [],
368367
"source": [
369-
"results = search_client.search(query_type='semantic', query_language='en-us', semantic_configuration_name='my-semantic-config',\n",
368+
"results = search_client.search(query_type='semantic', semantic_configuration_name='my-semantic-config',\n",
370369
" search_text=\"what hotel has a good restaurant on site\", \n",
371370
" select='HotelName,Description,Category', query_caption='extractive')\n",
372371
"\n",
@@ -400,7 +399,7 @@
400399
"metadata": {},
401400
"outputs": [],
402401
"source": [
403-
"results = search_client.search(query_type='semantic', query_language='en-us', semantic_configuration_name='my-semantic-config',\n",
402+
"results = search_client.search(query_type='semantic', semantic_configuration_name='my-semantic-config',\n",
404403
" search_text=\"what hotel stands out for its gastronomic excellence\", \n",
405404
" select='HotelName,Description,Category', query_caption='extractive', query_answer=\"extractive\",)\n",
406405
"\n",
@@ -439,7 +438,7 @@
439438
"cell_type": "markdown",
440439
"metadata": {},
441440
"source": [
442-
"If you are finished with this index, you can delete it by running the following lines. Deleting unnecessary indexes frees up space for stepping through more quickstarts and tutorials."
441+
"If you're finished with this index, you can delete it by running the following lines. Deleting unnecessary indexes frees up space for stepping through more quickstarts and tutorials."
443442
]
444443
},
445444
{

Quickstart/v11/azure-search-quickstart.ipynb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
25-
"# Uncomment the next line if you need to install the azure-search-documents client library:\n",
26-
"# %pip install azure-search-documents --pre\n",
27-
"\n",
28-
"# This sample uses version: 11.1.0\n",
25+
"# Import the libraies used in this notebook\n",
2926
"%pip show azure-search-documents\n",
3027
"\n",
3128
"import os\n",
@@ -80,7 +77,7 @@
8077
"cell_type": "markdown",
8178
"metadata": {},
8279
"source": [
83-
"In the third cell, the index \"hotels-quickstart\" will be deleted if it previously existed."
80+
"In the next step, the index \"hotels-quickstart\" is deleted, assuming it already exists on your search service. This action frees up index space and an allows you to reuse the index name. "
8481
]
8582
},
8683
{

Tutorial-AI-Enrichment/PythonTutorial-AzureSearch-AIEnrichment.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"headers = {'Content-Type': 'application/json',\n",
6060
" 'api-key': '<YOUR-ADMIN-API-KEY>'}\n",
6161
"params = {\n",
62-
" 'api-version': '2020-06-30'\n",
62+
" 'api-version': '2023-11-01'\n",
6363
"}"
6464
]
6565
},

0 commit comments

Comments
 (0)