In this post we will be discussing about solving "Total Requests made to DataSource": "0" in Solr when connecting to Sql Server. Let's say I have created a new core and now I want to get some of my documents from the Sql Server to be indexed. For that I have to create a data config file which connects to my Sql Server and gets the desired data.
The connection to the DataSource is written like below
Even though everything is correct you will get "Total Requests made to DataSource": "0", that's because you have not done an important step. That important step is to have a sqljdbc4.jar / sqljdbc6.jar (Download From : https://www.microsoft.com/en-us/download/details.aspx?id=11774) executable jar File inside your lib folder. The lib folder should be inside your Solr Installation directory and withing server folder. If you are using the latest version then you will need sqljdbc6.jar.
Once you are done with it, you will get the required results as you want.
Please like and share the CodingDefined.com blog if you find it useful and helpful.
The connection to the DataSource is written like below
<dataSource type="JdbcDataSource" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://server\instancename;databaseName=myDb" user="sa" password="myPassword"/>
Even though everything is correct you will get "Total Requests made to DataSource": "0", that's because you have not done an important step. That important step is to have a sqljdbc4.jar / sqljdbc6.jar (Download From : https://www.microsoft.com/en-us/download/details.aspx?id=11774) executable jar File inside your lib folder. The lib folder should be inside your Solr Installation directory and withing server folder. If you are using the latest version then you will need sqljdbc6.jar.
Once you are done with it, you will get the required results as you want.
Please like and share the CodingDefined.com blog if you find it useful and helpful.
Related articles
- How to create Simple Twitter Bot in Node.js
- Legacy Browser Support for using Babel
- Getting Started with Node.js Koa 2 Framework
- Web Scraping Libraries for Node.js Developers
- How to Create Simple RSS Reader in Ionic Application
- Simple RESTful API in Nodejs
- How to Get Latest Tweets of a particular HashTag using Nodejs
- How to Intercept HTTP requests in Node.js
- Node for Android
- Capture Screen of Web Pages through URL in Nodejs
No comments:
Post a Comment