Open
Description
Library name and version
Azure.Search.Service 10.1.0
Describe the bug
Cannot create index.
public class DocumentIndex
{
[SimpleField(IsKey = true)]
public string metadata_storage_path { get; set; }
.
.
.
.
.
}
Error
Microsoft.Rest.Azure.CloudException: 'The request is invalid. Details: index : Found 0 key fields in index 'index'. Each index must have exactly one key field.'
Expected behavior
Index Created
Actual behavior
Error
Microsoft.Rest.Azure.CloudException: 'The request is invalid. Details: index : Found 0 key fields in index 'index'. Each index must have exactly one key field.'
Reproduction Steps
foreach (var index in Indexes.IndexList)
{
var definition = new Index()
{
Name = index,
Fields = FieldBuilder.BuildForType<DocumentIndex>()
};
await client.Indexes.CreateAsync(definition);
}
Environment
No response