Skip to content

Commit 03e938f

Browse files
committed
formatting for readability
1 parent 64fc9dd commit 03e938f

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ If your index has complex types, your query can provide those fields if you firs
324324
import json
325325

326326
# Query is the question being asked. It's sent to the search engine and the LLM.
327-
query="Can you recommend a few hotels that offer complimentary breakfast? Tell me their description, address, tags, and the rate for one room they have which sleep 4 people."
327+
query="Can you recommend a few hotels that offer complimentary breakfast?
328+
Tell me their description, address, tags, and the rate for one room that sleeps 4 people."
328329

329330
# Set up the search results and the chat thread.
330331
# Retrieve the selected fields from the search index related to the question.
@@ -354,28 +355,34 @@ print(response.choices[0].message.content)
354355
Output is from Azure OpenAI, and it adds content from complex types.
355356

356357
```
357-
Absolutely! Here are a few hotels that offer complimentary breakfast:
358+
Here are a few hotels that offer complimentary breakfast and have rooms that sleep 4 people:
358359

359360
1. **Head Wind Resort**
360-
- **Description:** The best of old town hospitality combined with views of the river and cool breezes off the prairie. Enjoy a complimentary continental breakfast in the lobby, and free Wi-Fi throughout the hotel.
361+
- **Description:** The best of old town hospitality combined with views of the river and
362+
cool breezes off the prairie. Enjoy a complimentary continental breakfast in the lobby,
363+
and free Wi-Fi throughout the hotel.
361364
- **Address:** 7633 E 63rd Pl, Tulsa, OK 74133, USA
362365
- **Tags:** Coffee in lobby, free Wi-Fi, view
363366
- **Room for 4:** Suite, 2 Queen Beds (Amenities) - $254.99
364367

365368
2. **Double Sanctuary Resort**
366-
- **Description:** 5-star Luxury Hotel - Biggest Rooms in the city. #1 Hotel in the area listed by Traveler magazine. Free WiFi, Flexible check in/out, Fitness Center & espresso in room. Offers continental breakfast.
369+
- **Description:** 5-star Luxury Hotel - Biggest Rooms in the city. #1 Hotel in the area
370+
listed by Traveler magazine. Free WiFi, Flexible check in/out, Fitness Center & espresso
371+
in room. Offers continental breakfast.
367372
- **Address:** 2211 Elliott Ave, Seattle, WA 98121, USA
368373
- **Tags:** View, pool, restaurant, bar, continental breakfast
369374
- **Room for 4:** Suite, 2 Queen Beds (Amenities) - $254.99
370375

371376
3. **Swan Bird Lake Inn**
372-
- **Description:** Continental-style breakfast featuring a variety of food and drinks. Locally made caramel cinnamon rolls are a favorite.
377+
- **Description:** Continental-style breakfast featuring a variety of food and drinks.
378+
Locally made caramel cinnamon rolls are a favorite.
373379
- **Address:** 1 Memorial Dr, Cambridge, MA 02142, USA
374380
- **Tags:** Continental breakfast, free Wi-Fi, 24-hour front desk service
375381
- **Room for 4:** Budget Room, 2 Queen Beds (City View) - $85.99
376382

377383
4. **Gastronomic Landscape Hotel**
378-
- **Description:** Known for its culinary excellence under the management of William Dough, offers continental breakfast.
384+
- **Description:** Known for its culinary excellence under the management of William Dough,
385+
offers continental breakfast.
379386
- **Address:** 3393 Peachtree Rd, Atlanta, GA 30326, USA
380387
- **Tags:** Restaurant, bar, continental breakfast
381388
- **Room for 4:** Budget Room, 2 Queen Beds (Amenities) - $66.99

articles/search/search-howto-complex-data-types.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,13 @@ To filter on a complex collection field, you can use a **lambda expression** wit
289289
290290
As with top-level simple fields, simple subfields of complex fields can only be included in filters if they have the **filterable** attribute set to `true` in the index definition. For more information, see the [Create Index API reference](/rest/api/searchservice/indexes/create).
291291

292-
Azure AI Search limits complex objects in a collection to 3,000 objects per document. Exceeding this limit results in the following message:
292+
### Workaround for the complex collection limit
293293

294-
`"A collection in your document exceeds the maximum elements across all complex collections limit. The document with key '1052' has '4303' objects in collections (JSON arrays). At most '3000' objects are allowed to be in collections across the entire document. Remove objects from collections and try indexing the document again."`
294+
Recall that Azure AI Search limits complex objects in a collection to 3,000 objects per document. Exceeding this limit results in the following message:
295+
296+
```
297+
A collection in your document exceeds the maximum elements across all complex collections limit. The document with key '1052' has '4303' objects in collections (JSON arrays). At most '3000' objects are allowed to be in collections across the entire document. Remove objects from collections and try indexing the document again."
298+
```
295299

296300
If you need more than 3,000 items, you can pipe (`|`) or use any form of delimiter to delimit the values, concatenate them, and store them as a delimited string. There's no limitation on the number of strings stored in an array. Storing complex values as strings bypasses the complex collection limitation.
297301

@@ -343,11 +347,13 @@ foreach (var filterItem in filterCombinations)
343347

344348
The following list provides inputs and search strings (outputs) side by side:
345349

346-
For "FRA" county code and the "1234" product code, the formatted output is ```|FRA|1234|*|```.
347-
For "1234" product code, the formatted output is ```|*|1234|*|```.
348-
For "C100" category code, the formatted output is ```|*|*|C100|```.
350+
+ For "FRA" county code and the "1234" product code, the formatted output is ```|FRA|1234|*|```.
351+
352+
+ For "1234" product code, the formatted output is ```|*|1234|*|```.
353+
354+
+ For "C100" category code, the formatted output is ```|*|*|C100|```.
349355

350-
Only provide the wild card entry placeholder if you're implementing the string array workaround. Otherwise, if you're using a complex type, your filter might look this example:
356+
Only provide the wildcard (`*`) if you're implementing the string array workaround. Otherwise, if you're using a complex type, your filter might look like this example:
351357

352358
```csharp
353359
var countryFilter = $"searchScope/any(ss: search.in(countryCode ,'FRA'))";

articles/search/search-limits-quotas-capacity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Maximum limits on storage, workloads, and quantities of indexes and other object
5353

5454
<sup>2</sup> The upper limit on fields includes both first-level fields and nested subfields in a complex collection. For example, if an index contains 15 fields and has two complex collections with five subfields each, the field count of your index is 25. Indexes with a very large fields collection can be slow. [Limit fields and attributes](search-what-is-an-index.md#physical-structure-and-size) to just those you need, and run indexing and query test to ensure performance is acceptable.
5555

56-
<sup>3</sup> An upper limit exists for elements because having a large number of them significantly increases the storage required for your index. An element of a complex collection is defined as a member of that collection. For example, assume a [Hotel document with a Rooms complex collection](search-howto-complex-data-types.md#indexing-complex-types), each room in the Rooms collection is considered an element. During indexing, the indexing engine can safely process a maximum of 3,000 elements across the document as a whole. [This limit](search-api-migration.md#upgrade-to-2019-05-06) was introduced in `api-version=2019-05-06` and applies to complex collections only, and not to string collections or to complex fields.
56+
<sup>3</sup> An upper limit exists for elements because having a large number of them significantly increases the storage required for your index. An element of a complex collection is defined as a member of that collection. For example, assume a [Hotel document with a Rooms complex collection](search-howto-complex-data-types.md#complex-collection-limits), each room in the Rooms collection is considered an element. During indexing, the indexing engine can safely process a maximum of 3,000 elements across the document as a whole. [This limit](search-api-migration.md#upgrade-to-2019-05-06) was introduced in `api-version=2019-05-06` and applies to complex collections only, and not to string collections or to complex fields.
5757

5858
<sup>4</sup> On most tiers, maximum index size is all available storage on your search service. For S2, S3, and S3 HD, the maximum size of any index is the number provided in the table. Applies to search services created after April 3, 2024.
5959

0 commit comments

Comments
 (0)