You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
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 ofField
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.)
The text was updated successfully, but these errors were encountered: