From 77a145b20be2140a42813a9cd3a15241a7cf7675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20D=C3=ADez?= Date: Wed, 29 Mar 2023 15:40:06 +0200 Subject: [PATCH] fix #53 use topic name to compute collection name --- .../jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java b/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java index aae6322..9d88075 100644 --- a/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java +++ b/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java @@ -53,7 +53,8 @@ SolrClient client(String topic) { @Override protected void process(String topic, UpdateRequest updateRequest) throws IOException, SolrServerException { SolrClient client = client(topic); - UpdateResponse response = updateRequest.process(client); + String collection = topic.isBlank() ? null : topic; + UpdateResponse response = updateRequest.process(client, collection); log.trace("process() - qtime = {} elapsedTime = {}", response.getQTime(), response.getElapsedTime()); }