static void Main(string[] args) { Client = NuSearchConfiguration.GetClient(); DumpReader = new NugetDumpReader(@"C:\work\ElasticSearch\NugetDump"); CurrentIndexName = NuSearchConfiguration.CreateIndexName(); var packages = DumpReader.Dumps.Take(1).First().NugetPackages; foreach (var package in packages) { var result = Client.Index(package); if (!result.IsValid) { Console.WriteLine(result.DebugInformation); Console.Read(); Environment.Exit(1); } Console.WriteLine("Done."); } //CreateIndex(); IndexDumps(); //SwapAlias(); Console.Read(); }
static void Main(string[] args) { Client = NuSearchConfiguration.GetClient(); CurrentIndexName = NuSearchConfiguration.CreateIndexName(); DeleteIndexIfExists(); DumpReader = new NugetDumpReader(@"C:\Projects\test\elasticsearch-net-example\nuget-data-dec-2016"); CreateIndex(); IndexDumps(); SwapAlias(); Console.Read(); }
static void Main(string[] args) { Client = NuSearchConfiguration.GetClient(); var directory = args.Length > 0 && !string.IsNullOrEmpty(args[0]) ? args[0] : NuSearchConfiguration.PackagePath; DumpReader = new NugetDumpReader(directory); CurrentIndexName = NuSearchConfiguration.CreateIndexName(); CreateIndex(); IndexDumps(); SwapAlias(); Console.WriteLine("Press any key to exit."); Console.ReadKey(); }