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

Search SDK: add reflection-based index definition #2427

Closed
idg10 opened this issue Oct 4, 2016 · 1 comment
Closed

Search SDK: add reflection-based index definition #2427

idg10 opened this issue Oct 4, 2016 · 1 comment
Assignees
Labels
Search Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@idg10
Copy link
Contributor

idg10 commented Oct 4, 2016

This is a feature request. Currently, the Azure Search SDK effectively requires you to define your schema twice, and to ensure that those definitions are in sync. When creating an index, you need to construct an Index object and populate it with a collection of Field objects describing the name and type of each field. Additionally you supply a type representing the index entries when adding or retrieving data. This type must have a property corresponding to each field.

It would reduce duplication and avoid the possibility of inconsistency if the type used when adding and retrieving entries could also be used when creating the index, with the SDK automatically populating the index definition by reflecting against the type. Attributes could be used to indicate which fields should be searchable and which should be the key. (It might make sense to use the .NET data annotation attributes for the latter.)

@brjohnstmsft
Copy link
Member

This feature is now merged. Big thanks to @idg10 for contributing this!

@bsiegel bsiegel added the Service Attention Workflow: This issue is responsible by Azure service team. label Sep 26, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Search Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants