static void Main(string[] args) { var client = new AzureSearchClient(Directory.GetCurrentDirectory()); var config = client.GetConfiguration(); int count = config.ScoringProfiles.Count; var scoringProfiles = config.ScoringProfiles.Select(x => x.GetScoringProfile()).ToList(); var results = client.Term("umbraco").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory()); results = client.DocumentType("TextPage").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory()); results = client.Media().Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory()); results = client.Media().PageSize(1).Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory()); results = client.Content().Filter("ContentTypeId", 1056).Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory()); results = client.Content().Contains("Path", "1070").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory()); results = client.Content().Contains("tags", "two").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); // IsProtected - Index }
static void Main(string[] args) { var client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); var results = client.Term("umbraco").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); results = client.DocumentType("TextPage").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); results = client.Media().Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); results = client.Media().PageSize(1).Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); results = client.Content().Filter("ContentTypeId", 1056).Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); results = client.Content().Contains("Path", "1070").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); client = new AzureSearchClient(Directory.GetCurrentDirectory(), @"config\AzureSearch.config"); results = client.Content().Contains("tags", "two").Results(); Console.WriteLine(); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); // IsProtected - Index }