diff --git a/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java b/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java index 09e850ade..f8aa83c46 100644 --- a/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java +++ b/imixs-workflow-index-solr/src/main/java/org/imixs/workflow/engine/solr/SolrIndexService.java @@ -93,8 +93,8 @@ public class SolrIndexService { private EntityManager manager; @Inject - @ConfigProperty(name = "solr.server", defaultValue = "http://solr:8983") - private String host; + @ConfigProperty(name = "solr.api", defaultValue = "http://solr:8983") + private String api; @Inject @ConfigProperty(name = "solr.core", defaultValue = "imixs-workflow") @@ -131,7 +131,7 @@ public class SolrIndexService { @PostConstruct public void init() { // create rest client - restClient = new RestClient(host); + restClient = new RestClient(api); if (user != null && !user.isEmpty()) { BasicAuthenticator authenticator = new BasicAuthenticator(user, password); restClient.registerRequestFilter(authenticator); @@ -153,7 +153,7 @@ public void setup(@Observes SetupEvent setupEvent) throws RestAPIException { // try to get the schma of the core... try { - String existingSchema = restClient.get(host + "/api/cores/" + core + "/schema"); + String existingSchema = restClient.get(api + "/api/cores/" + core + "/schema"); logger.info("...core - OK "); // update schema @@ -188,7 +188,7 @@ public void updateSchema(String schema) throws RestAPIException { String schemaUpdate = buildUpdateSchema(schema); // test if the schemaUdpate contains instructions.... if (!"{}".equals(schemaUpdate)) { - String uri = host + "/api/cores/" + core + "/schema"; + String uri = api + "/api/cores/" + core + "/schema"; logger.info("...updating schema '" + core + "':"); logger.finest("..." + schemaUpdate); restClient.post(uri, schemaUpdate, "application/json"); @@ -226,7 +226,7 @@ public void indexDocuments(List documents) throws RestAPIExcepti logger.finest(xmlRequest); } - String uri = host + "/solr/" + core + "/update?commit=true"; + String uri = api + "/solr/" + core + "/update?commit=true"; restClient.post(uri, xmlRequest, "text/xml"); } @@ -274,7 +274,7 @@ public void removeDocuments(List documents) throws RestAPIException { } xmlDelete.append(""); String xmlRequest = xmlDelete.toString(); - String uri = host + "/solr/" + core + "/update"; + String uri = api + "/solr/" + core + "/update"; logger.finest("......delete documents '" + core + "':"); restClient.post(uri, xmlRequest, "text/xml"); } @@ -337,7 +337,7 @@ public String query(String searchTerm, int pageSize, int pageIndex, SortOrder so // URL Encode the query string.... try { - uri.append(host + "/solr/" + core + "/query"); + uri.append(api + "/solr/" + core + "/query"); // set default operator? if (defaultOperator == DefaultOperator.OR) { diff --git a/src/site/markdown/engine/luceneservice.md b/src/site/markdown/engine/luceneservice.md index 21a9bdea4..f84e83ff5 100644 --- a/src/site/markdown/engine/luceneservice.md +++ b/src/site/markdown/engine/luceneservice.md @@ -203,7 +203,7 @@ Apache Solr provides a lot of flexibility in configuration and offers additional There is a set of optional properties which can be set to access the solr instance: - - _solr.server_ - solr host (default http://solr:8983); + - _solr.api_ - solr api endpoint (default host=http://solr:8983); - _solr.core_ - the solr core (default 'imixs-workflow') - _solr.configset_ - an optional solr config set (default set is '_default') - _solr.user_ - optional user id to login @@ -217,7 +217,7 @@ The optional parameter can be set together with the the index schema configurat index.fields.analyze= index.fields.noanalyze=datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber, txtUsername # Solr configuration - solr.server=http://my-solr-host:8983 + solr.api=http://my-solr-host:8983