public ActionResult TestLoad() { // ElastaTools.LoadDirectorsTest(); var movies = ElastaTools.GetImdbMovieListings(); ElastaTools.LoadCollectionInfoIndex(movies, ElastaTools.GetElasticClient(GetDemoIndexName()), GetDemoIndexName()); return(Content("Data has been loaded")); }
public ActionResult Index(MovieSearchViewModel vm) { var client = ElastaTools.GetElasticClient(GetDemoIndexName()); var searchRequest = ElastaTools.BuildSearchRequest(vm); vm.QueryResults = ElastaTools.SearchMovies(client, GetDemoIndexName(), searchRequest); vm.FoundMovies = vm.QueryResults.Documents.ToList(); vm.QueryJson = client.RequestResponseSerializer.SerializeToString(searchRequest); return(View(vm)); }