I created an Azure Search Service and am aware of this. However, this link deals with semi structured data. How can I setup an index on text files programmatically in C# similar to this? I am also wondering how to associate Azure Search Service with my blob storage or is this done automatically? Thanks.
If you follow the approach from your first link, you'll need to change the Hotel model to something like the following:
public class BlobModel
{
[JsonProperty("@search.score")]
public float searchscore { get; set; }
[JsonProperty("content")]
public string Content { get; set; }
[JsonProperty("metadata_storage_content_type")]
public string MetadataStorageContentType { get; set; }
[JsonProperty("metadata_storage_size")]
public int MetadataStorageSize { get; set; }
[JsonProperty("metadata_storage_last_modified")]
public DateTime MetadataStorageLastModified { get; set; }
[JsonProperty("metadata_storage_content_md5")]
public string MetadataStorageContentMd5 { get; set; }
[JsonProperty("metadata_storage_name")]
public string MetadataStorageName { get; set; }
[JsonProperty("metadata_storage_path")]
public string MetadataStoragePath { get; set; }
[JsonProperty("metadata_title")]
public string MetadataTitle { get; set; }
[JsonProperty("metadata_content_encoding")]
public string MetadataContentEncoding { get; set; }
}
please note that you'll need to populate all those properties manually, unless you use an indexer, which will automatically bind the storage to your index (as described in your second link). If you don't want to use the REST API, there are available methods on Azure Cognitive Search SDK too: