Skip to content

Commit 80240ce

Browse files
Merge pull request #224069 from HeidiSteen/heidist-gh
[azure search] GH issue, confusing statement in semantic answers doc
2 parents e5256b6 + 5f65286 commit 80240ce

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: heidist
88
ms.service: cognitive-search
99
ms.devlang: python
1010
ms.topic: quickstart
11-
ms.date: 08/31/2022
11+
ms.date: 01/17/2023
1212
ms.custom: devx-track-python, mode-api
1313
---
1414

@@ -275,7 +275,7 @@ This step shows you how to query an index using the **search** method of the [se
275275
1. The following step executes an empty search (`search=*`), returning an unranked list (search score = 1.0) of arbitrary documents. Because there are no criteria, all documents are included in results. This query prints just two of the fields in each document. It also adds `include_total_count=True` to get a count of all documents (4) in the results.
276276

277277
```python
278-
results = search_client.search(search_text="*", include_total_count=True)
278+
results = search_client.search(search_text="*", include_total_count=True)
279279

280280
print ('Total Documents Matching Query:', results.get_count())
281281
for result in results:
@@ -285,7 +285,7 @@ This step shows you how to query an index using the **search** method of the [se
285285
1. The next query adds whole terms to the search expression ("wifi"). This query specifies that results contain only those fields in the `select` statement. Limiting the fields that come back minimizes the amount of data sent back over the wire and reduces search latency.
286286

287287
```python
288-
results = search_client.search(search_text="wifi", include_total_count=True, select='HotelId,HotelName,Tags')
288+
results = search_client.search(search_text="wifi", include_total_count=True, select='HotelId,HotelName,Tags')
289289

290290
print ('Total Documents Matching Query:', results.get_count())
291291
for result in results:
@@ -295,16 +295,16 @@ This step shows you how to query an index using the **search** method of the [se
295295
1. Next, apply a filter expression, returning only those hotels with a rating greater than 4, sorted in descending order.
296296

297297
```python
298-
results = search_client.search(search_text="hotels", select='HotelId,HotelName,Rating', filter='Rating gt 4', order_by='Rating desc')
298+
results = search_client.search(search_text="hotels", select='HotelId,HotelName,Rating', filter='Rating gt 4', order_by='Rating desc')
299299

300300
for result in results:
301301
print("{}: {} - {} rating".format(result["HotelId"], result["HotelName"], result["Rating"]))
302302
```
303303

304-
1. Add `search_fields` to scope query matching to a single field.
304+
1. Add `search_fields` (an array) to scope query matching to a single field.
305305

306306
```python
307-
results = search_client.search(search_text="sublime", search_fields='HotelName', select='HotelId,HotelName')
307+
results = search_client.search(search_text="sublime", search_fields=['HotelName'], select='HotelId,HotelName')
308308

309309
for result in results:
310310
print("{}: {}".format(result["HotelId"], result["HotelName"]))
@@ -313,7 +313,7 @@ This step shows you how to query an index using the **search** method of the [se
313313
1. Facets are labels that can be used to compose facet navigation structure. This query returns facets and counts for Category.
314314

315315
```python
316-
results = search_client.search(search_text="*", facets=["Category"])
316+
results = search_client.search(search_text="*", facets=["Category"])
317317

318318
facets = results.get_facets()
319319

articles/search/semantic-answers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 11/02/2022
11+
ms.date: 01/16/2023
1212
---
1313

1414
# Return a semantic answer in Azure Cognitive Search
@@ -166,7 +166,7 @@ For best results, return semantic answers on a document corpus having the follow
166166

167167
+ The "semanticConfiguration" must include fields that offer sufficient text in which an answer is likely to be found. Fields more likely to contain answers should be listed first in "prioritizedContentFields". Only verbatim text from a document can appear as an answer.
168168

169-
+ Query strings must not be null (search=`*`) and the string should have the characteristics of a question, as opposed to a keyword search (a sequential list of arbitrary terms or phrases). If the query string doesn't appear to be answer, answer processing is skipped, even if the request specifies "answers" as a query parameter.
169+
+ Query strings must not be null (search=`*`) and the string should have the characteristics of a question, such as "what is" or "how to", as opposed to a keyword search consisting of terms or phrases in arbitrary order. If the query string doesn't appear to be a question, answer processing is skipped, even if the request specifies "answers" as a query parameter.
170170

171171
+ Semantic extraction and summarization have limits over how many tokens per document can be analyzed in a timely fashion. In practical terms, if you have large documents that run into hundreds of pages, try to break up the content into smaller documents first.
172172

0 commit comments

Comments
 (0)