Commit ae059876 authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen
Browse files

services: trigger indexing in euler (disabled)

parent 73ca6b84
......@@ -735,6 +735,18 @@ public class SearchServiceImpl implements SearchService {
LOG.error(format("Failed to index %s in elasticsearch", xuri.getUri()), e);
throw new ServerErrorException(e.getMessage(), INTERNAL_SERVER_ERROR);
//triggerIndexingInEuler(idx, xuri);
private void triggerIndexingInEuler(String idx, XURI xuri) {
try (CloseableHttpClient httpclient = createDefault()) {
URI uri = new URI("http://euler:8080/api/authorities/"+xuri.getType()+"/"+xuri.getId()+"/index");
try (CloseableHttpResponse putResponse = httpclient.execute(new HttpPut(uri))) {
// no-op
} catch (Exception e) {
LOG.error(format("Failed to trigger indexing of %s in euler", xuri.getUri()), e);
private Response doSearch(String query, URIBuilder searchUriBuilder) {
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