From 66ec4fa0b9c55bfd6005a852192f6e35cf01896a Mon Sep 17 00:00:00 2001 From: Xiang Yan Date: Tue, 2 Mar 2021 16:55:17 -0800 Subject: [PATCH] remove first query section (#17033) * remove first query section * update --- eng/.docsettings.yml | 1 + sdk/search/azure-search-documents/README.md | 34 --------------------- 2 files changed, 1 insertion(+), 34 deletions(-) diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 587bf5297031..d896c3859d1a 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -126,6 +126,7 @@ known_content_issues: - ['sdk/keyvault/azure-keyvault-nspkg/README.md', 'nspkg and common'] - ['sdk/mixedreality/azure-mixedreality-nspkg/README.md', 'nspkg and common'] - ['sdk/search/azure-search-nspkg/README.md', 'nspkg and common'] + - ['sdk/search/azure-search-documents/README.md', 'nspkg and common'] - ['sdk/storage/azure-storage-blob/samples/README.md', 'nspkg and common'] - ['sdk/storage/azure-storage-file-datalake/samples/README.md', 'nspkg and common'] - ['sdk/storage/azure-storage-blob-changefeed/samples/README.md', 'nspkg and common'] diff --git a/sdk/search/azure-search-documents/README.md b/sdk/search/azure-search-documents/README.md index a08f2066d211..e6c857585b7d 100644 --- a/sdk/search/azure-search-documents/README.md +++ b/sdk/search/azure-search-documents/README.md @@ -106,40 +106,6 @@ client = SearchClient(endpoint=endpoint, credential=credential) ``` - -### Send your first search request - -To get running immediately, we're going to connect to a well known sandbox -Search service provided by Microsoft. This means you do not need an Azure -subscription or Azure Cognitive Search service to try out this query. - - -```python -from azure.core.credentials import AzureKeyCredential -from azure.search.documents import SearchClient - -# We'll connect to the Azure Cognitive Search public sandbox and send a -# query to its "nycjobs" index built from a public dataset of available jobs -# in New York. -service_name = "azs-playground" -index_name = "nycjobs" -api_key = "252044BE3886FE4A8E3BAA4F595114BB" - -# Create a SearchClient to send queries -endpoint = "https://{}.search.windows.net/".format(service_name) -credential = AzureKeyCredential(api_key) -client = SearchClient(endpoint=endpoint, - index_name=index_name, - credential=credential) - -# Let's get the top 5 jobs related to Microsoft -results = client.search(search_text="Microsoft", top=5) - -for result in results: - # Print out the title and job description - print("{}\n{}\n)".format(result["business_title"], result["job_description"])) -``` - ## Key concepts An Azure Cognitive Search service contains one or more indexes that provide