Skip to content

Commit 0441c17

Browse files
Merge pull request #268844 from HeidiSteen/heidist-fix
Fixed copy paste error
2 parents 6600509 + b7f8133 commit 0441c17

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

articles/search/includes/quickstarts/dotnet-semantic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Azure AI Search searches over content stored in the service. The code for upload
118118
Here's a query that invokes semantic ranking, with search options for specifying parameters:
119119

120120
```csharp
121-
Console.WriteLine("Query #3: Invoke semantic ranking");
121+
Console.WriteLine("Example of a semantic query.");
122122

123123
options = new SearchOptions()
124124
{

articles/search/includes/quickstarts/python-semantic.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ It can take a minute to set up. If you run into problems, see [Python environmen
5252

5353
#### Create an index
5454

55+
Create or update an index schema to include a `SemanticConfiguration`. If you're updating an existing index, this modification doesn't require a reindexing because the structure of your documents is unchanged.
56+
5557
```python
5658
from azure.search.documents.indexes import SearchIndexClient
5759
from azure.search.documents import SearchClient
@@ -116,6 +118,8 @@ print(f' {result.name} created')
116118

117119
#### Create a documents payload
118120

121+
You can push JSON documents to a search index. Documents must match the index schema.
122+
119123
```python
120124
documents = [
121125
{
@@ -240,22 +244,15 @@ In this query for "what hotel has a good restaurant on site", Sublime Cliff Hote
240244

241245
```python
242246
# Run a text query (returns a BM25-scored result set)
243-
results = search_client.search(query_type='semantic', semantic_configuration_name='my-semantic-config',
244-
search_text="what hotel has a good restaurant on site",
245-
select='HotelName,Description,Category', query_caption='extractive')
246-
247+
results = search_client.search(query_type='simple',
248+
search_text="what hotel has a good restaurant on site" ,
249+
select='HotelName,HotelId,Description',
250+
include_total_count=True)
251+
247252
for result in results:
248-
print(result["@search.reranker_score"])
253+
print(result["@search.score"])
249254
print(result["HotelName"])
250255
print(f"Description: {result['Description']}")
251-
252-
captions = result["@search.captions"]
253-
if captions:
254-
caption = captions[0]
255-
if caption.highlights:
256-
print(f"Caption: {caption.highlights}\n")
257-
else:
258-
print(f"Caption: {caption.text}\n")
259256
```
260257

261258
#### Run a semantic query

articles/search/includes/quickstarts/python.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ for result in results:
256256

257257
#### Add field scoping
258258

259-
Add `search_fields` (an array) to scope query matching to a single field.
259+
Add `search_fields` to scope query execution to specific fields.
260260

261261
```python
262-
# Add search_fields (an array) to scope query matching to a single field
262+
# Add search_fields to scope query matching to the HotelName field
263263
results = search_client.search(
264264
search_text="sublime",
265265
search_fields=['HotelName'],

0 commit comments

Comments
 (0)