Skip to content

Commit 16c04d5

Browse files
Merge pull request #5520 from HeidiSteen/heidist-work
Updated full text quickstarts to use approved hotels data
2 parents 570a04b + 8f34f5a commit 16c04d5

File tree

5 files changed

+70
-127
lines changed

5 files changed

+70
-127
lines changed

articles/search/includes/quickstarts/full-text-csharp.md

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: haileytap
44
ms.author: haileytapia
55
ms.service: azure-ai-search
66
ms.topic: include
7-
ms.date: 03/04/2025
7+
ms.date: 06/13/2025
88
---
99

1010
[!INCLUDE [Full text introduction](full-text-intro.md)]
@@ -172,13 +172,12 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
172172
new Hotel()
173173
{
174174
HotelId = "1",
175-
HotelName = "Secret Point Motel",
176-
Description = "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time's Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.",
177-
DescriptionFr = "L'hôtel est idéalement situé sur la principale artère commerciale de la ville en plein cœur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d'autres lieux d'intérêt qui font de New York l'une des villes les plus attractives et cosmopolites de l'Amérique.",
175+
HotelName = "Stay-Kay City Hotel",
176+
Description = "This classic hotel is fully-refurbished and ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Times Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.",
178177
Category = "Boutique",
179-
Tags = new[] { "pool", "air conditioning", "concierge" },
178+
Tags = new[] { "view", "air conditioning", "concierge" },
180179
ParkingIncluded = false,
181-
LastRenovationDate = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.Zero),
180+
LastRenovationDate = new DateTimeOffset(2022, 1, 18, 0, 0, 0, TimeSpan.Zero),
182181
Rating = 3.6,
183182
Address = new Address()
184183
{
@@ -193,13 +192,12 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
193192
new Hotel()
194193
{
195194
HotelId = "2",
196-
HotelName = "Twin Dome Motel",
197-
Description = "The hotel is situated in a nineteenth century plaza, which has been expanded and renovated to the highest architectural standards to create a modern, functional and first-class hotel in which art and unique historical elements coexist with the most modern comforts.",
198-
DescriptionFr = "L'hôtel est situé dans une place du XIXe siècle, qui a été agrandie et rénovée aux plus hautes normes architecturales pour créer un hôtel moderne, fonctionnel et de première classe dans lequel l'art et les éléments historiques uniques coexistent avec le confort le plus moderne.",
195+
HotelName = "Old Century Hotel",
196+
Description = "The hotel is situated in a nineteenth century plaza, which has been expanded and renovated to the highest architectural standards to create a modern, functional and first-class hotel in which art and unique historical elements coexist with the most modern comforts. The hotel also regularly hosts events like wine tastings, beer dinners, and live music.",
199197
Category = "Boutique",
200198
Tags = new[] { "pool", "free wifi", "concierge" },
201199
ParkingIncluded = false,
202-
LastRenovationDate = new DateTimeOffset(1979, 2, 18, 0, 0, 0, TimeSpan.Zero),
200+
LastRenovationDate = new DateTimeOffset(2019, 2, 18, 0, 0, 0, TimeSpan.Zero),
203201
Rating = 3.60,
204202
Address = new Address()
205203
{
@@ -214,11 +212,10 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
214212
new Hotel()
215213
{
216214
HotelId = "3",
217-
HotelName = "Triple Landscape Hotel",
218-
Description = "The Hotel stands out for its gastronomic excellence under the management of William Dough, who advises on and oversees all of the Hotel’s restaurant services.",
219-
DescriptionFr = "L'hôtel est situé dans une place du XIXe siècle, qui a été agrandie et rénovée aux plus hautes normes architecturales pour créer un hôtel moderne, fonctionnel et de première classe dans lequel l'art et les éléments historiques uniques coexistent avec le confort le plus moderne.",
220-
Category = "Resort and Spa",
221-
Tags = new[] { "air conditioning", "bar", "continental breakfast" },
215+
HotelName = "Gastronomic Landscape Hotel",
216+
Description = "The Gastronomic Hotel stands out for its culinary excellence under the management of William Dough, who advises on and oversees all of the Hotel’s restaurant services.",
217+
Category = "Suite",
218+
Tags = new[] { "restaurant", "bar", "continental breakfast" },
222219
ParkingIncluded = true,
223220
LastRenovationDate = new DateTimeOffset(2015, 9, 20, 0, 0, 0, TimeSpan.Zero),
224221
Rating = 4.80,
@@ -235,13 +232,12 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
235232
new Hotel()
236233
{
237234
HotelId = "4",
238-
HotelName = "Sublime Cliff Hotel",
239-
Description = "Sublime Cliff Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 1800 palace.",
240-
DescriptionFr = "Le sublime Cliff Hotel est situé au coeur du centre historique de sublime dans un quartier extrêmement animé et vivant, à courte distance de marche des sites et monuments de la ville et est entouré par l'extraordinaire beauté des églises, des bâtiments, des commerces et Monuments. Sublime Cliff fait partie d'un Palace 1800 restauré avec amour.",
235+
HotelName = "Sublime Palace Hotel",
236+
Description = "Sublime Palace Hotel is located in the heart of the historic center of Sublime in an extremely vibrant and lively area within short walking distance to the sites and landmarks of the city and is surrounded by the extraordinary beauty of churches, buildings, shops and monuments. Sublime Cliff is part of a lovingly restored 19th century resort, updated for every modern convenience.",
241237
Category = "Boutique",
242-
Tags = new[] { "concierge", "view", "24-hour front desk service" },
238+
Tags = new[] { "concierge", "view", "air conditioning" },
243239
ParkingIncluded = true,
244-
LastRenovationDate = new DateTimeOffset(1960, 2, 06, 0, 0, 0, TimeSpan.Zero),
240+
LastRenovationDate = new DateTimeOffset(2020, 2, 06, 0, 0, 0, TimeSpan.Zero),
245241
Rating = 4.60,
246242
Address = new Address()
247243
{
@@ -400,10 +396,6 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
400396
[SearchableField(AnalyzerName = LexicalAnalyzerName.Values.EnLucene)]
401397
public string Description { get; set; }
402398
403-
[SearchableField(AnalyzerName = LexicalAnalyzerName.Values.FrLucene)]
404-
[JsonPropertyName("Description_fr")]
405-
public string DescriptionFr { get; set; }
406-
407399
[SearchableField(IsFilterable = true, IsSortable = true, IsFacetable = true)]
408400
public string Category { get; set; }
409401
@@ -446,10 +438,6 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
446438
[SearchableField(AnalyzerName = LexicalAnalyzerName.Values.EnLucene)]
447439
public string Description { get; set; }
448440
449-
[SearchableField(AnalyzerName = LexicalAnalyzerName.Values.FrLucene)]
450-
[JsonPropertyName("Description_fr")]
451-
public string DescriptionFr { get; set; }
452-
453441
[SearchableField(IsFilterable = true, IsSortable = true, IsFacetable = true)]
454442
public string Category { get; set; }
455443
@@ -527,11 +515,6 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
527515
builder.AppendFormat("Description: {0}\n", Description);
528516
}
529517
530-
if (!String.IsNullOrEmpty(DescriptionFr))
531-
{
532-
builder.AppendFormat("Description (French): {0}\n", DescriptionFr);
533-
}
534-
535518
if (!String.IsNullOrEmpty(Category))
536519
{
537520
builder.AppendFormat("Category: {0}\n", Category);
@@ -609,7 +592,6 @@ AzureKeyCredential credential = new AzureKeyCredential("<Your search service adm
609592
610593
Output includes messages from [Console.WriteLine](/dotnet/api/system.console.writeline), with the addition of query information and results.
611594
612-
613595
## Explaining the code
614596
615597
In the previous sections, you created a new console application and installed the Azure AI Search client library. You added code to create a search index, load it with documents, and run queries. You ran the program to see the results in the console.
@@ -720,12 +702,11 @@ private static void UploadDocuments(SearchClient searchClient)
720702
{
721703
HotelId = "1",
722704
HotelName = "Stay-Kay City Hotel",
723-
Description = "The hotel is ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Time's Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.",
724-
DescriptionFr = "L'hôtel est idéalement situé sur la principale artère commerciale de la ville en plein cœur de New York. A quelques minutes se trouve la place du temps et le centre historique de la ville, ainsi que d'autres lieux d'intérêt qui font de New York l'une des villes les plus attractives et cosmopolites de l'Amérique.",
705+
Description = "This classic hotel is fully-refurbished and ideally located on the main commercial artery of the city in the heart of New York. A few minutes away is Times Square and the historic centre of the city, as well as other places of interest that make New York one of America's most attractive and cosmopolitan cities.",
725706
Category = "Boutique",
726-
Tags = new[] { "pool", "air conditioning", "concierge" },
707+
Tags = new[] { "view", "air conditioning", "concierge" },
727708
ParkingIncluded = false,
728-
LastRenovationDate = new DateTimeOffset(1970, 1, 18, 0, 0, 0, TimeSpan.Zero),
709+
LastRenovationDate = new DateTimeOffset(2022, 1, 18, 0, 0, 0, TimeSpan.Zero),
729710
Rating = 3.6,
730711
Address = new Address()
731712
{
@@ -849,6 +830,7 @@ WriteDocuments(response);
849830
```
850831
851832
#### Query example 3
833+
852834
The third query demonstrates `searchFields`, used to scope a full text search operation to specific fields.
853835
854836
```csharp

0 commit comments

Comments
 (0)