Skip to content

Commit

Permalink
remove first query section (#17033)
Browse files Browse the repository at this point in the history
* remove first query section

* update
  • Loading branch information
xiangyan99 committed Mar 3, 2021
1 parent 6eee65d commit 66ec4fa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
1 change: 1 addition & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
34 changes: 0 additions & 34 deletions sdk/search/azure-search-documents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66ec4fa

Please sign in to comment.