I am new to solr ,actually I tried Database table indexing in solr manually,i.e creating a new data-config.xml and running the full import from solr webUI, successfully did that.But now I need to do the same thing in java.So I need know the following things using java.
How to set solr datasource in java api.
How to set the entity and query
How to run full import .
Actually ,for data import we write a configuration file like below
But my requirement is ,I don't want to configure any xml file like above,just I want do it all from java only ,so I need to set all the configurations which I have given in above xml from java code itself,i.e something like below
ModifiableSolrParams params =newModifiableSolrParams(); params.set("Datasource","JdbcDataSource")
params.set("driver","com.mysql.jdbc.Driver")params.set("url","jdbc:mysql://localhost:3306/test_db")params.set("user","cloudera")params.set("password","cloudera") params.set("query","select * from emp"),etc.
I think my requirement is clear.If not please ask me .Please help to do this.Its urgent ,It would be really so much helpful for me...