Skip to content

Commit c60c18b

Browse files
committed
split full text quickstart via pivots
1 parent 17ad097 commit c60c18b

File tree

5 files changed

+42
-42
lines changed

5 files changed

+42
-42
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Build a console application using the [Azure.Search.Documents](/dotnet/api/overv
1313

1414
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-dotnet-samples/tree/main/quickstart/v11) to start with a finished project or follow these steps to create your own.
1515

16-
##Set up your environment
16+
## Set up your environment
1717

1818
1. Start Visual Studio and create a new project for a console app.
1919

@@ -25,7 +25,7 @@ Alternatively, you can [download the source code](https://github.com/Azure-Sampl
2525

2626
1. Select **Install** to add the assembly to your project and solution.
2727

28-
##Create a search client
28+
## Create a search client
2929

3030
1. In *Program.cs*, change the namespace to `AzureSearch.SDK.Quickstart.v11` and then add the following `using` directives.
3131

@@ -59,7 +59,7 @@ Alternatively, you can [download the source code](https://github.com/Azure-Sampl
5959
}
6060
```
6161

62-
##Create an index
62+
## Create an index
6363

6464
This quickstart builds a Hotels index that you'll load with hotel data and execute queries against. In this step, define the fields in the index. Each field definition includes a name, data type, and attributes that determine how the field is used.
6565

@@ -168,7 +168,7 @@ In this example, synchronous methods of the *Azure.Search.Documents* library are
168168
}
169169
```
170170

171-
##Load documents
171+
## Load documents
172172

173173
Azure AI Search searches over content stored in the service. In this step, you'll load JSON documents that conform to the hotel index you just created.
174174

@@ -304,7 +304,7 @@ When uploading documents, you must use an [IndexDocumentsBatch](/dotnet/api/azur
304304

305305
The 2-second delay compensates for indexing, which is asynchronous, so that all documents can be indexed before the queries are executed. Coding in a delay is typically only necessary in demos, tests, and sample applications.
306306

307-
##Search an index
307+
## Search an index
308308

309309
You can get query results as soon as the first document is indexed, but actual testing of your index should wait until all documents are indexed.
310310

@@ -462,7 +462,7 @@ The previous queries show multiple [ways of matching terms in a query](/azure/se
462462

463463
Full text search and filters are performed using the [SearchClient.Search](/dotnet/api/azure.search.documents.searchclient.search) method. A search query can be passed in the `searchText` string, while a filter expression can be passed in the [Filter](/dotnet/api/azure.search.documents.searchoptions.filter) property of the [SearchOptions](/dotnet/api/azure.search.documents.searchoptions) class. To filter without searching, just pass `"*"` for the `searchText` parameter of the [Search](/dotnet/api/azure.search.documents.searchclient.search) method. To search without filtering, leave the `Filter` property unset, or don't pass in a `SearchOptions` instance at all.
464464

465-
##Run the program
465+
## Run the program
466466

467467
Press **F5** to rebuild the app and run the program in its entirety.
468468

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Build a Java console application using the [Azure.Search.Documents](/java/api/ov
1313

1414
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-java-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
1515

16-
##Set up your environment
16+
## Set up your environment
1717

1818
Use the following tools to create this quickstart.
1919

2020
+ [Visual Studio Code with the Java extension](https://code.visualstudio.com/docs/java/extensions)
2121

2222
+ [Java 11 SDK](/java/azure/jdk/)
2323

24-
##Create the project
24+
## Create the project
2525

2626
1. Start Visual Studio Code.
2727

@@ -57,7 +57,7 @@ Use the following tools to create this quickstart.
5757

5858
1. Open the folder you created the project in.
5959

60-
##Specify Maven dependencies
60+
## Specify Maven dependencies
6161

6262
1. Open the *pom.xml* file and add the following dependencies.
6363

@@ -89,7 +89,7 @@ Use the following tools to create this quickstart.
8989
<maven.compiler.target>1.11</maven.compiler.target>
9090
```
9191

92-
##Create a search client
92+
## Create a search client
9393

9494
1. Open the `App` class under **src**, **main**, **java**, **azure**, **search**, **sample**. Add the following import directives.
9595

@@ -138,7 +138,7 @@ Use the following tools to create this quickstart.
138138
}
139139
```
140140

141-
##Create an index
141+
## Create an index
142142

143143
This quickstart builds a Hotels index that you'll load with hotel data and execute queries against. In this step, define the fields in the index. Each field definition includes a name, data type, and attributes that determine how the field is used.
144144

@@ -325,7 +325,7 @@ Whether you use the basic `SearchField` API or either one of the helper models,
325325
.setSuggesters(new SearchSuggester("sg", Arrays.asList("HotelName"))));
326326
```
327327

328-
##Load documents
328+
## Load documents
329329

330330
Azure AI Search searches over content stored in the service. In this step, you'll load JSON documents that conform to the hotel index you just created.
331331

@@ -454,7 +454,7 @@ Once you initialize the `IndexDocumentsBatch` object, you can send it to the ind
454454

455455
The 2-second delay compensates for indexing, which is asynchronous, so that all documents can be indexed before the queries are executed. Coding in a delay is typically only necessary in demos, tests, and sample applications.
456456

457-
##Search an index
457+
## Search an index
458458

459459
You can get query results as soon as the first document is indexed, but actual testing of your index should wait until all documents are indexed.
460460

@@ -584,7 +584,7 @@ The previous queries show multiple ways of matching terms in a query: full-text
584584

585585
Full text search and filters are performed using the [SearchClient.search](/java/api/com.azure.search.documents.searchclient#com-azure-search-documents-searchclient-search(java-lang-string)) method. A search query can be passed in the `searchText` string, while a filter expression can be passed in the `filter` property of the [SearchOptions](/java/api/com.azure.search.documents.models.searchoptions) class. To filter without searching, just pass "*" for the `searchText` parameter of the `search` method. To search without filtering, leave the `filter` property unset, or don't pass in a `SearchOptions` instance at all.
586586

587-
### Run the program
587+
## Run the program
588588

589589
Press F5 to rebuild the app and run the program in its entirety.
590590

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Build a Node.js application using the [@azure/search-documents](/javascript/api/
1313

1414
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
1515

16-
##Set up your environment
16+
## Set up your environment
1717

1818
We used the following tools to create this quickstart.
1919

2020
+ [Visual Studio Code](https://code.visualstudio.com), which has built-in support for creating JavaScript apps
2121

2222
+ [Node.js](https://nodejs.org) and [npm](https://www.npmjs.com)
2323

24-
##Create the project
24+
## Create the project
2525

2626
1. Start Visual Studio Code.
2727

@@ -85,7 +85,7 @@ We used the following tools to create this quickstart.
8585
8686
Replace the `YOUR-SEARCH-SERVICE-URL` value with the name of your search service endpoint URL. Replace `<YOUR-SEARCH-ADMIN-API-KEY>` with the admin key you recorded earlier.
8787
88-
##Create index.js file
88+
## Create index.js file
8989
9090
Next we create an *index.js* file, which is the main file that hosts our code.
9191
@@ -128,7 +128,7 @@ main().catch((err) => {
128128

129129
With that in place, we're ready to create an index.
130130

131-
##Create index
131+
## Create index
132132

133133
Create a file *hotels_quickstart_index.json*. This file defines how Azure AI Search works with the documents you'll be loading in the next step. Each field will be identified by a `name` and have a specified `type`. Each field also has a series of index attributes that specify whether Azure AI Search can search, filter, sort, and facet upon the field. Most of the fields are simple data types, but some, like `AddressType` are complex types that allow you to create rich data structures in your index. You can read more about [supported data types](/rest/api/searchservice/supported-data-types) and index attributes described in [Create Index (REST)](/rest/api/searchservice/indexes/create).
134134

@@ -311,7 +311,7 @@ let index = await indexClient.createIndex(indexDefinition);
311311
console.log(`Index named ${index.name} has been created.`);
312312
```
313313

314-
##Run the sample
314+
## Run the sample
315315

316316
At this point, you're ready to run the sample. Use a terminal window to run the following command:
317317

@@ -329,7 +329,7 @@ Open the **Overview** of your search service in the Azure portal. Select the **I
329329

330330
In the next step, you'll add data to index.
331331

332-
##Load documents
332+
## Load documents
333333

334334
In Azure AI Search, documents are data structures that are both inputs to indexing and outputs from queries. You can push such data to the index or use an [indexer](/azure/search/search-indexer-overview). In this case, we'll programatically push the documents to the index.
335335

@@ -459,7 +459,7 @@ To have the program wait for one second, call the `sleep` function like below:
459459
sleep(1000);
460460
```
461461

462-
##Search an index
462+
## Search an index
463463

464464
With an index created and documents uploaded, you're ready to send queries to the index. In this section, we send five different queries to the search index to demonstrate different pieces of query functionality available to you.
465465

@@ -552,6 +552,6 @@ let documentResult = await searchClient.getDocument(key='3')
552552
console.log(`HotelId: ${documentResult.HotelId}; HotelName: ${documentResult.HotelName}`)
553553
```
554554

555-
##Run the sample
555+
## Run the sample
556556

557557
Run the program by using `node index.js`. Now, in addition to the previous steps, the queries are sent and the results written to the console.

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Use a Jupyter notebook and the [azure-search-documents](/python/api/overview/azu
1313

1414
Alternatively, you can download and run a [finished notebook](https://github.com/Azure-Samples/azure-search-python-samples/tree/main/Quickstart).
1515

16-
##Set up your environment
16+
## Set up your environment
1717

1818
Use [Visual Studio Code with the Python extension](https://code.visualstudio.com/docs/languages/python), or an equivalent IDE, with Python 3.10 or later.
1919

@@ -31,7 +31,7 @@ We recommend a virtual environment for this quickstart:
3131

3232
It can take a minute to set up. If you run into problems, see [Python environments in VS Code](https://code.visualstudio.com/docs/python/environments).
3333

34-
##Install packages and set variables
34+
## Install packages and set variables
3535

3636
1. Install packages, including [azure-search-documents](/python/api/azure-search-documents).
3737

@@ -49,7 +49,7 @@ It can take a minute to set up. If you run into problems, see [Python environmen
4949
index_name: str = "hotels-quickstart"
5050
```
5151

52-
##Create an index
52+
## Create an index
5353

5454
```python
5555
from azure.core.credentials import AzureKeyCredential
@@ -99,7 +99,7 @@ result = index_client.create_or_update_index(index)
9999
print(f' {result.name} created')
100100
```
101101

102-
##Create a documents payload
102+
## Create a documents payload
103103

104104
Use an [index action](/python/api/azure-search-documents/azure.search.documents.models.indexaction) for the operation type, such as upload or merge-and-upload. Documents originate from the [HotelsData](https://github.com/Azure-Samples/azure-search-sample-data/blob/main/hotels/HotelsData_toAzureSearch.JSON) sample on GitHub.
105105

@@ -185,7 +185,7 @@ documents = [
185185
]
186186
```
187187

188-
##Upload documents
188+
## Upload documents
189189

190190
```python
191191
# Upload documents to the index
@@ -202,7 +202,7 @@ except Exception as ex:
202202
endpoint=search_endpoint, credential=credential)
203203
```
204204

205-
##Run your first query
205+
## Run your first query
206206

207207
Use the *search* method of the [search.client class](/python/api/azure-search-documents/azure.search.documents.searchclient).
208208

@@ -222,7 +222,7 @@ for result in results:
222222
print(f"Description: {result['Description']}")
223223
```
224224

225-
##Run a term query
225+
## Run a term query
226226

227227
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.
228228

@@ -239,7 +239,7 @@ for result in results:
239239
print(f"Description: {result['Description']}")
240240
```
241241

242-
##Add a filter
242+
## Add a filter
243243

244244
Add a filter expression, returning only those hotels with a rating greater than four, sorted in descending order.
245245

@@ -255,7 +255,7 @@ for result in results:
255255
print("{}: {} - {} rating".format(result["HotelId"], result["HotelName"], result["Rating"]))
256256
```
257257

258-
##Add field scoping
258+
## Add field scoping
259259

260260
Add `search_fields` to scope query execution to specific fields.
261261

@@ -270,7 +270,7 @@ for result in results:
270270
print("{}: {}".format(result["HotelId"], result["HotelName"]))
271271
```
272272

273-
##Add facets
273+
## Add facets
274274

275275
Facets are generated for positive matches found in search results. There are no zero matches. If search results don't include the term *wifi*, then *wifi* doesn't appear in the faceted navigation structure.
276276

@@ -284,7 +284,7 @@ for facet in facets["Category"]:
284284
print(" {}".format(facet))
285285
```
286286

287-
##Look up a document
287+
## Look up a document
288288

289289
Return a document based on its key. This operation is useful if you want to provide drill through when a user selects an item in a search result.
290290

@@ -298,7 +298,7 @@ print("Rating: {}".format(result["Rating"]))
298298
print("Category: {}".format(result["Category"]))
299299
```
300300

301-
##Add autocomplete
301+
## Add autocomplete
302302

303303
Autocomplete can provide potential matches as the user types into the search box.
304304

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Build a Node.js application using the [@azure/search-documents](/javascript/api/
1313

1414
Alternatively, you can [download the source code](https://github.com/Azure-Samples/azure-search-javascript-samples/tree/main/quickstart) to start with a finished project or follow these steps to create your own.
1515

16-
##Set up your environment
16+
## Set up your environment
1717

1818
We used the following tools to create this quickstart.
1919

@@ -23,7 +23,7 @@ We used the following tools to create this quickstart.
2323

2424
* [TypeScript](https://www.typescriptlang.org/download/)
2525

26-
##Create the project
26+
## Create the project
2727

2828
1. Start Visual Studio Code.
2929

@@ -87,7 +87,7 @@ We used the following tools to create this quickstart.
8787
8888
Replace the `YOUR-SEARCH-SERVICE-URL` value with the name of your search service endpoint URL. Replace `<YOUR-SEARCH-ADMIN-API-KEY>` with the admin key you recorded earlier.
8989
90-
##Create index.ts file
90+
## Create index.ts file
9191
9292
Next we create an *index.ts* file, which is the main file that hosts our code.
9393
@@ -141,7 +141,7 @@ main().catch((err) => {
141141

142142
With that in place, we're ready to create an index.
143143

144-
##Create index
144+
## Create index
145145

146146
Create a file *hotels_quickstart_index.json*. This file defines how Azure AI Search works with the documents you'll be loading in the next step. Each field will be identified by a `name` and have a specified `type`. Each field also has a series of index attributes that specify whether Azure AI Search can search, filter, sort, and facet upon the field. Most of the fields are simple data types, but some, like `AddressType` are complex types that allow you to create rich data structures in your index. You can read more about [supported data types](/rest/api/searchservice/supported-data-types) and index attributes described in [Create Index (REST)](/rest/api/searchservice/indexes/create).
147147

@@ -333,7 +333,7 @@ let index = await indexClient.createIndex(hotelIndexDefinition);
333333
console.log(`Index named ${index.name} has been created.`);
334334
```
335335

336-
##Run the sample
336+
## Run the sample
337337

338338
At this point, you're ready to build and run the sample. Use a terminal window to run the following commands to build your source with `tsc` then run your source with `node`:
339339

@@ -352,7 +352,7 @@ Open the **Overview** of your search service in the Azure portal. Select the **I
352352

353353
In the next step, you'll add data to index.
354354

355-
##Load documents
355+
## Load documents
356356

357357
In Azure AI Search, documents are data structures that are both inputs to indexing and outputs from queries. You can push such data to the index or use an [indexer](/azure/search/search-indexer-overview). In this case, we'll programatically push the documents to the index.
358358

@@ -498,7 +498,7 @@ To have the program wait for one second, call the `sleep` function:
498498
sleep(1000);
499499
```
500500

501-
##Search an index
501+
## Search an index
502502

503503
With an index created and documents uploaded, you're ready to send queries to the index. In this section, we send five different queries to the search index to demonstrate different pieces of query functionality available to you.
504504

@@ -598,6 +598,6 @@ let documentResult = await searchClient.getDocument('3')
598598
console.log(`HotelId: ${documentResult.HotelId}; HotelName: ${documentResult.HotelName}`)
599599
```
600600

601-
##Rerun the sample
601+
## Rerun the sample
602602

603603
Build and run the program with `tsc && node index.ts`. Now, in addition to the previous steps, the queries are sent and the results written to the console.

0 commit comments

Comments
 (0)