tag:blogger.com,1999:blog-4535217030890065119.post2789936582315038904..comments2023-03-29T13:07:10.275-07:00Comments on Just Did Some Code: Taste of Apache Camel: Part IV - SolrAndrejVhttp://www.blogger.com/profile/11902781618508650216noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4535217030890065119.post-57132648580922962952014-12-22T18:31:36.170-08:002014-12-22T18:31:36.170-08:00I haven't tried the other examples. I wanted t...I haven't tried the other examples. I wanted to use the List to send bulk documents. Could you share the camel-solr version and solr version that you tried? I'm using the latest versionsKrantihttps://www.blogger.com/profile/14390160539019784567noreply@blogger.comtag:blogger.com,1999:blog-4535217030890065119.post-16683122003495901062014-12-22T03:45:27.792-08:002014-12-22T03:45:27.792-08:00Hello,
are two previous examples working fine?
S...Hello,<br /><br />are two previous examples working fine?<br /><br />Sometimes streaming causes problems. I fixed it by using same JAR version as SOLR index. This is silly because SOLR is backward compatible at least to version 4.0.AndrejVhttps://www.blogger.com/profile/11902781618508650216noreply@blogger.comtag:blogger.com,1999:blog-4535217030890065119.post-59471333012560967602014-12-22T02:02:14.840-08:002014-12-22T02:02:14.840-08:00Andre,
thanks for sharing the info. I was trying ...Andre, <br />thanks for sharing the info. I was trying your example but the docs are not posted to Solr<br /><br />public class FileRouteBuilder extends RouteBuilder {<br /> public void configure() {<br /> from("file:///camel/javatest/data?noop=true")<br /> .bean(new ExampleBean(), "giveMeMovies2(${body})")<br /> .setHeader(SolrConstants.OPERATION, constant(SolrConstants.OPERATION_INSERT_STREAMING))<br /> .to("solr://localhost:8983/solr/coreMovies")<br /> .setHeader(SolrConstants.OPERATION, constant(SolrConstants.OPERATION_COMMIT))<br /> .to("solr://localhost:8983/solr/coreMovies")<br /> .setHeader(SolrConstants.OPERATION, constant(SolrConstants.OPERATION_OPTIMIZE))<br /> .to("solr://localhost:8983/solr/coreMovies")<br /> .stop();<br /> }<br /><br /> public static void main(String[] args) throws Exception {<br /> Main main = new Main();<br /> main.enableHangupSupport();<br /> main.addRouteBuilder(new FileRouteBuilder());<br /> main.run(args);<br /> }<br />}<br /><br />I'm trying to run this class from my IDE, if I debug I can see the file has been read and the List have been prepared but not posted to Solr using the ".to(URI)"<br /><br />any thoughts?Krantihttps://www.blogger.com/profile/14390160539019784567noreply@blogger.com