kafka-connect-solr icon indicating copy to clipboard operation
kafka-connect-solr copied to clipboard

Use topic name to compute the collection to send the updates in "Standard Solr"

Open didiez opened this issue 1 year ago • 0 comments

In "Standard Solr" mode, there is no way to route messages dynamically to multiple collections using RegexRouter as noted in the docs.

HttpSolrSinkTask should use topic to send the documents to a solr collection with that very same name. Either appending the collection to the base solrUrl in ... https://github.com/jcustenborder/kafka-connect-solr/blob/c917b5c8e938575b6880729f3dbbb7cac4062cb8/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java#L42 Or using the overloaded method process(SolrClient client, String collection) in https://github.com/jcustenborder/kafka-connect-solr/blob/c917b5c8e938575b6880729f3dbbb7cac4062cb8/src/main/java/com/github/jcustenborder/kafka/connect/solr/HttpSolrSinkTask.java#L56

didiez avatar Mar 29 '23 13:03 didiez