Skip to content

Conversation

@Mohit-Chakraborty
Copy link
Contributor

  • Update referenced spec version to e6fa7db9
  • Update generated code
  • Hide a few model types - AnswerResult, Answers, CaptionResult, QueryLanguage, Speller
  • Expose struct CharFilterName
  • Enable skills - CustomEntityLookupSkill, DocumentExtractionSkill
  • Provide LexicalNormalizer as a search field
  • Fix RoundtripAllSkills test and add session record
  • Initialize normalizers collection in search index
  • Disable setters on collection properties from CustomEntity, CustomEntityLookupSkill and DocumentExtractionSkill
  • Update public API file

@Mohit-Chakraborty
Copy link
Contributor Author

cc: @tg-msft

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments. Mainly I want to see the ODataType params and properties cleaned up given how we do it for other discriminated types in the SDK. Other languages should be similar, i.e. the OData stuff generally shouldn't be exposed directly.

public partial class CustomEntity
{
/// <summary> An array of complex objects that can be used to specify alternative spellings or synonyms to the root entity name. </summary>
public IList<CustomEntityAlias> Aliases { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was necessary to prevent the setters? @pakrym I'm concerned this is a regression. These weren't settable before. The last thread I can find on the matter, we were going to try an AddRange extension method first.

That said, this shouldn't hold up this PR. You're doing the right thing here, @Mohit-Chakraborty, it just shouldn't be necessary as, without it, it goes against .NET guidelines we haven't formerly overridden.

/cc @KrzysztofCwalina @tg-msft @schaabs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is to remove setters from collection properties.

public partial class DocumentExtractionSkill
{
/// <summary> A dictionary of configurations for the skill. </summary>
public IDictionary<string, object> Configuration { get; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a dictionary of or containing well-known key-value pairs? See the IndexingParameterConfiguration class for what we did in that case. Note that if this is the first time something like this is shipping, avoid all the casting magic I do and just declare it as an expandable property bag with well-known properties the first time. We only shipped the SDK that way previously because it had to GA without the well-known autorest configuration finalized and we couldn't break the API later.

@Mohit-Chakraborty Mohit-Chakraborty linked an issue Apr 3, 2021 that may be closed by this pull request
Copy link
Member

@tg-msft tg-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall - left a couple of small comments.

public DocumentExtractionSkill(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.InputFieldMappingEntry> inputs, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.OutputFieldMappingEntry> outputs) { }
public System.Collections.Generic.IDictionary<string, object> Configuration { get { throw null; } }
public string DataToExtract { get { throw null; } set { } }
public string ParsingMode { get { throw null; } set { } }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be an enum which means we probably have a swagger bug? Fine for this preview, but we should dig into it.

@Mohit-Chakraborty Mohit-Chakraborty merged commit 51dbfa8 into master Apr 4, 2021
@Mohit-Chakraborty Mohit-Chakraborty deleted the SearchAutoRestUpdate branch April 4, 2021 02:15
@Mohit-Chakraborty Mohit-Chakraborty linked an issue Apr 12, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for normalizers Add new data source support for ADLS Gen2

5 participants