Commit cd42c94f authored by Matija Obreza's avatar Matija Obreza

Mini fixes to make stuff work

parent cf10361f
......@@ -181,6 +181,6 @@ public class SearchController {
}
}
return "/search2/index";
return "/search/index2";
}
}
......@@ -106,7 +106,7 @@ public class ElasticSearchController {
elasticService.regenerateIndexes();
return "redirect:/admin/elastic/";
}
/**
* Completely recreate Elasticsearch indexes: create, index, re-alias.
*
......@@ -126,24 +126,15 @@ public class ElasticSearchController {
* @throws IOException
*/
@RequestMapping(method = RequestMethod.POST, value = "/action", params = { "reindex=accn", "filter" })
public String reindexElasticFiltered(@RequestParam(value = "filter", required = true) String jsonFilter,
@RequestParam(value = "type", required = true) String type) throws IOException {
public String reindexElasticFiltered(@RequestParam(value = "filter", required = true) String jsonFilter) throws IOException {
FilterHandler.AppliedFilters filters = mapper.readValue(jsonFilter, FilterHandler.AppliedFilters.class);
if (type.equals("All")) {
elasticService.reindex(filters);
fullTextSearchService.regenerateIndexes();
} else if (type.equals(Accession.class.getName())) {
elasticService.reindex(filters);
} else {
fullTextSearchService.reindex(type);
}
elasticService.reindex(filters);
return "redirect:/admin/elastic/";
}
/**
* This method refreshes data in the currently active index. It is very
* handy when having to refresh part of ES after direct database update.
......@@ -163,7 +154,6 @@ public class ElasticSearchController {
return "redirect:/admin/elastic/";
}
/**
* Clear ES queue
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment