Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure-search-documents Readme and samples issues #12506

Closed
v-xuto opened this issue Jul 13, 2020 · 3 comments
Closed

azure-search-documents Readme and samples issues #12506

v-xuto opened this issue Jul 13, 2020 · 3 comments
Assignees
Labels
blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. Docs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Search test-manual-pass
Milestone

Comments

@v-xuto
Copy link
Member

v-xuto commented Jul 13, 2020

Section Link1 and Link2:
image

Reason:
KeyError: 'hotelId', 'hotelName'.

Suggestion:

print("{}: {})".format(result["HotelId"], result["HotelName"]))

Section link:
image

Reason:
NameError: name 'client' is not defined.

Suggestion:

search_client = SearchClient(endpoint, index_name, credential=AzureKeyCredential(key))
result = search_client.upload_documents(documents=[DOCUMENT])

Section Link:
image

Suggestion:
Remove extra ';' at the end of the sentence.
4.
Section Link:
image

Reason:
AttributeError: 'SearchIndexerClient' object has no attribute 'create_datasource'.

Suggestion:

def _create_datasource():
    # Here we create a datasource. As mentioned in the description we have stored it in
    # "searchcontainer"
    ds_client = SearchIndexerClient(service_endpoint, AzureKeyCredential(key))
    container = SearchIndexerDataContainer(name='searchcontainer')
    data_source_connection = SearchIndexerDataSourceConnection(
        name="hotel-datasource",
        type="azureblob",
        connection_string=connection_string,
        container=container
    )
    result = ds_client.create_data_source_connection(data_source_connection)
    return result

Section Link:
image

Suggestion1:
Update SearchIndexerClientt to SearchIndexClient.

Suggestion2:
Update ind_client to indexers_client.

Suggestion3:
Update indexer-hotels to hotels.

@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 13, 2020
@v-xuto
Copy link
Member Author

v-xuto commented Jul 13, 2020

@jongio for notification.

@kaerm kaerm added Client This issue points to a problem in the data-plane of the library. Docs Search labels Jul 13, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 13, 2020
@kaerm
Copy link
Contributor

kaerm commented Jul 13, 2020

@v-xuto thanks for reviewing this, @xiangyan99 can you take a look at this

@tzhanl tzhanl added blocking-release Blocks release manual-test-pass needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Jul 16, 2020
@tzhanl tzhanl added this to the [2020] August milestone Jul 16, 2020
@xiangyan99
Copy link
Member

Fixed in #12595

openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Jan 22, 2021
azure Resource Mover Swagger fixes (Azure#12506)

Co-authored-by: Durgesh Kumar <dukum@microsoft.com>
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Jan 22, 2021
azure Resource Mover Swagger fixes (Azure#12506)

Co-authored-by: Durgesh Kumar <dukum@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocking-release Blocks release Client This issue points to a problem in the data-plane of the library. Docs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Search test-manual-pass
Projects
None yet
Development

No branches or pull requests

4 participants