Skip to content

[Azure Search] Generate code for the Index and Suggest APIs#5303

Merged
brjohnstmsft merged 8 commits intoAzure:search-previewfrom
brjohnstmsft:generate-suggest
Mar 5, 2019
Merged

[Azure Search] Generate code for the Index and Suggest APIs#5303
brjohnstmsft merged 8 commits intoAzure:search-previewfrom
brjohnstmsft:generate-suggest

Conversation

@brjohnstmsft
Copy link
Member

Corresponding Swagger PR: Azure/azure-rest-api-specs#5219

This change replaces a bunch of custom code with generated code, specifically for the Index and Suggest APIs.

There are some breaking changes:

  1. DocumentSuggestResult/Base and SuggestResult/Base have been removed. For dynamic typing scenarios, use DocumentSuggestResult and SuggestResult.
  2. IndexBatch/Base and IndexAction/Base have been removed. For dynamic typing scenarios, use IndexBatch and IndexAction.
    We have already bumped the major SDK version in anticipation of these breaking changes.

Big thanks to @mhko who did the majority of the work on this.

FYI @arv100kri @Yahnoosh

…ernal

Also made AutocompleteRequest internal. All the *Request classes are
implementation details that never should have been public.

Also fixed some erroneous documentation.
From now on, for dynamically-typed scenarios, callers of Suggest need to use
DocumentSuggestResult<Document> and SuggestResult<Document> instead. This
will make it easier to transition the implementation of this API to generated
code.
…asses

These classes are not really necessary since you can always use
IndexAction<Document> and IndexBatch<Document> instead. Removing them will
make it easier to replace the implementation of the Index API with generated
code.

This is a breaking change.
This includes the custom model classes IndexBatch and IndexAction as well.
@arv100kri
Copy link
Member

Is it by design that the Generated metadata points to your fork and not the public Azure repo?
Is that why [DO NOT MERGE] ?

@brjohnstmsft
Copy link
Member Author

@arv100kri Yes, thanks for reminding me. I still need to update that. Will push another commit in a little while.

Also, the [DO NOT MERGE] is to let azure-sdk-for-net maintainers know that we (Azure Search team) will take care of merging this, since it targets the search-preview branch.

@arv100kri arv100kri self-requested a review March 1, 2019 01:59
@brjohnstmsft brjohnstmsft reopened this Mar 1, 2019
@natinimni
Copy link
Contributor

LGTM

@brjohnstmsft brjohnstmsft changed the title [DO NOT MERGE] [Azure Search] Generate code for the Index and Suggest APIs [Azure Search] Generate code for the Index and Suggest APIs Mar 5, 2019
@brjohnstmsft brjohnstmsft merged commit 846d202 into Azure:search-preview Mar 5, 2019
@brjohnstmsft brjohnstmsft deleted the generate-suggest branch March 5, 2019 22:44
@UD1412
Copy link

UD1412 commented Mar 5, 2019

sign-off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants