IIndexResponse SaveNewRoute(string indexName, DynamicOpenSearchRoute route) { return client.Index<DynamicOpenSearchRoute>(route, i => i.Id(route.Id).Index("ec_routes")); }
void RegisterDynamicRoute(string indexName, DynamicOpenSearchRoute route) { string newRoute = string.Format("/api/{0}/{1}/{2}", indexName, route.Id, route.RouteFromIndex); //AppHost.Instance.Routes.Add<DynamicRouteRequest>(newRoute); AppHost.Instance.Dispose(); //AppHost.Clear(); //new AppHost().Init(); }