You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/search/azure-search-documents/README.md
+39-28
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,11 @@ The above creates a resource with the "Standard" pricing tier. See [choosing a p
40
40
In order to interact with the Cognitive Search service you'll need to create an instance of the Search Client class.
41
41
To make this possible you will need an [api-key of the Cognitive Search service](https://docs.microsoft.com/en-us/azure/search/search-security-api-keys).
42
42
43
-
The SDK provides two clients.
43
+
The SDK provides three clients.
44
44
45
45
1. SearchClient for all document operations.
46
-
2. SearchServiceClient for all CRUD operations on service resources.
46
+
2. SearchIndexClient for all CRUD operations on index resources.
47
+
3. SearchIndexerClient for all CRUD operations on indexer resources.
Once you have the values of the Cognitive Search Service [service endpoint](https://docs.microsoft.com/en-us/azure/search/search-create-service-portal#get-a-key-and-url-endpoint)
70
-
and [api key](https://docs.microsoft.com/en-us/azure/search/search-security-api-keys) you can create the Search Service client:
71
+
and [api key](https://docs.microsoft.com/en-us/azure/search/search-security-api-keys) you can create the Search Index client:
71
72
72
73
```python
73
74
from azure.core.credentials import AzureKeyCredential
74
-
from azure.search.documents importSearchServiceClient
75
+
from azure.search.documents.indexesimportSearchIndexClient
Once you have the values of the Cognitive Search Service [service endpoint](https://docs.microsoft.com/en-us/azure/search/search-create-service-portal#get-a-key-and-url-endpoint)
86
+
and [api key](https://docs.microsoft.com/en-us/azure/search/search-security-api-keys) you can create the Search Indexer client:
87
+
88
+
```python
89
+
from azure.core.credentials import AzureKeyCredential
90
+
from azure.search.documents.indexes import SearchIndexerClient
You can use the `SearchClient` you created in the first section above to make a basic search request:
85
101
```python
86
-
results = client.search(query="spa")
102
+
results = client.search(search_text="spa")
87
103
88
104
print("Hotels containing 'spa' in the name (or other fields):")
89
105
for result in results:
@@ -100,7 +116,7 @@ source to extract and load data into an index.
100
116
There are several types of operations that can be executed against the service:
101
117
102
118
-**Index management operations** Create, delete, update, or configure a search index. ([API Reference](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchIndexesClient), [Service Docs](https://docs.microsoft.com/en-us/rest/api/searchservice/index-operations))
103
-
-**Document operations** Add, update, or delete documents in the index, query the index, or look up specific documents by ID. ([API Reference](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchClient), [Service Docs](https://docs.microsoft.com/en-us/rest/api/searchservice/document-operations))
119
+
-**Document operations** Add, update, or delete documents in the index, query the index, or look up specific documents by ID. ([API Reference](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchClient), [Service Docs](https://docs.microsoft.com/en-us/rest/api/searchservice/document-operations))
104
120
-**Datasource operations** Create, delete, update, or configure data sources for Search Indexers ([API Reference](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchDataSourcesClient), [Service Docs](https://docs.microsoft.com/en-us/rest/api/searchservice/indexer-operations))
105
121
-**Indexer operations** Automate aspects of an indexing operation by configuring a data source and an indexer that you can schedule or run on demand. This feature is supported for a limited number of data source types. ([API Reference](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchIndexersClient), [Service Docs](https://docs.microsoft.com/en-us/rest/api/searchservice/indexer-operations))
106
122
-**Skillset operations** Part of a cognitive search workload, a skillset defines a series of a series of enrichment processing steps. A skillset is consumed by an indexer. ([API Reference](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-search-documents/latest/azure.search.documents.html#azure.search.documents.SearchSkillsetsClient), [Service Docs](https://docs.microsoft.com/en-us/rest/api/searchservice/skillset-operations))
@@ -126,7 +142,7 @@ from azure.core.credentials import AzureKeyCredential
0 commit comments