A while back a had a little time to play with Solr, and was instantly blown away by the performance we could achieve on some of our bigger datasets.
Here is some of my initial setup and configuration learnings to maybe help someone get it up and running a little faster.
Starting with setting both up on windows.
Download and extract Apache Tomcat and Solr and copy into your working folders.
If you want tomcat as a service install it using the following:
Edit the tomcat users under conf.:
If you are going to query Solr using international characters (>127) using HTTP-GET, you must configure Tomcat to conform to the URI standard by accepting percent-encoded UTF-8.
to the conf/server.xml
Copy the contents of the example\solr your solr home directory D:\Java\apache-solr-3.6.0\home
create the code fragment on $CATALINA_HOME/conf/Catalina/localhost/solr.xml pointing to your solr home.
Startup tomcat, login, deploy the solr.war.
It should be available at http://localhost:8080/solr/admin/
To create a quick test using SolrJ the creates and reads data:
Grab the following Maven Libs:
Adding data directly from the DB
Firstly you need to add the relevant DB libs to the add classpath. Then create data-config.xml as below, if you require custom fields, those can be specified under the fieldstag in the schema.xml shown below the dataconfig.xml
A custom field in the schema.xml:
Add in the solrconfig.xml make sure to point the the data-config.xml, the handler has to be registered in the solrconfig.xml as follows.
Once that is all setup a full import can be done with the following:
Then you should be good to go with some lightning fast data retrieval.
I make no claim to be a "computer scientist" or a software "engineer", those titles alone can spark some debate, I regar...
I recently finished 97 Things every programmer should know . Well to be completely honest I did skim over a couple of the 97, but all and al...
This series of posts will be about me getting to grips with JBoss Drools . The reasoning behind it is: SAP bought out my company's curre...
I have over the last couple years used EhCache either via Spring (with AOP) or having it configured as hibernates' cache. I have never ...
I saw an article (well more of a rant) the other day, by Rob Williams Brain Drain in enterprise Dev . I have to say, I do agree with some o...