Created
February 24, 2016 07:15
-
-
Save kdhollow/4ad9997cba1d5e37a052 to your computer and use it in GitHub Desktop.
Azure Search Data Parse and Index Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var airportIndexTasks = Parse( async (identifier, city, state, name, chart, region, afdlink) => | |
{ | |
var airport = new Airport() | |
{ | |
Id = Guid.NewGuid().ToString("N"), | |
Identifier = identifier, | |
City = city, | |
State = state, | |
Name = name, | |
Chart = chart, | |
Region = region, | |
AfdLink = afdlink | |
}; | |
await azureSearchEngine.IndexItemsAsync(indexName, new List<Airport>() {airport}, | |
async indName => | |
{ | |
await CreateIndexInternalAsync(indName); | |
}); | |
}); | |
await Task.WhenAll(airportIndexTasks); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment