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

Add AddSearchIndexerClient Extension Method for Azure AI Search #43233

Open
xantari opened this issue Apr 5, 2024 · 4 comments
Open

Add AddSearchIndexerClient Extension Method for Azure AI Search #43233

xantari opened this issue Apr 5, 2024 · 4 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Search

Comments

@xantari
Copy link

xantari commented Apr 5, 2024

Library name

Azure.Core.Extensions

Please describe the feature.

Currently you only have registration methods for AddSearchIndexClient and AddSearchClient.

It would be helpful to also add AddSearchIndexerClient to this: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/search/Azure.Search.Documents/src/SearchClientBuilderExtensions.cs

builder.AddClient<SearchIndexerClient, SearchClientOptions>((opts) =>
{
    return new SearchIndexerClient(new Uri(config.SearchServiceUrl), new AzureKeyCredential(config.SearchServiceQueryApiKey));
});

The above is the current work around (not the end of the world, but you had extension methods for the other client registrations so I wouldn't see why you wouldn't add this one as well.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Search labels Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@pallavit
Copy link
Member

pallavit commented Apr 5, 2024

@jsquire do we have a criteria on deciding when to add extensions for clients across our SDKs?

@jsquire
Copy link
Member

jsquire commented Apr 5, 2024

@jsquire do we have a criteria on deciding when to add extensions for clients across our SDKs?

@pallavit: General guidance has been that we should have an extension to register every top-level client exposed by a library, unless they have special needs for use/lifetime management where passing them around doesn't make sense.

@pallavit
Copy link
Member

pallavit commented Apr 5, 2024

It may be worth having a static analyzer for this then - we may have a few gaps in our SDKs.
/cc: @m-nash do we have this added to the DPG generator i.e. we create an extension for each builder?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Search
Projects
Status: Untriaged
Development

No branches or pull requests

4 participants