Solr 5 NewRelic Configuration


Solr 5

Solr 5 NewRelic Configuration

Solr 5 comes with a great new feature to install as a Linux service.  If you previously ran Solr4 under Tomcat or other Java container, and you used NewRelic for application performance monitoring, you might be wondering the best way to include the NewRelic Java agent with your new Solr 5 service.

Assuming the default location of your Solr service installation is /var/solr, perform the following steps to start monitoring Solr in NewRelic.

Read more

Tomcat Connection Pool Optimization

Tomcat Connection Pool LogoTomcat JDBC Connection Pool Tuning

In Tomcat 7, the default connection pool provider is DBCP.  The Tomcat authors obviously realized that this pooling implementation wasn’t ready for prime time, so they created their own implementation.  The team at Apache has done a very thorough job of outlining all the shortcomings of DBCP along with the features of their new implementation.

As of this writing, both Tomcat 7 and Tomcat 8 use the DBCP Connection Pool by default when you declare a Datasource as a <Resource/> in your context.xml.  Perhaps one day the production ready implementation will be the default.  Until then, frustrated DevOps Engineers will find this article useful and necessary.

Read more

Indexing Special Terms Using Solr


If you use Solr for any technical corpus, you will soon need to know how to perform indexing special terms using Solr. Solr supplies some really convenient field types in their default schema.xml.  If you have used text-general to index any document with special terms (words) you have probably experienced the frustration with missing hyphenated terms.  Also, special terms like computer skills are not indexed correctly.


Index documents like resumes and job descriptions, which contain terms that include punctuation.  Preserve the punctuation on terms that need to be indexed, but remove similar punctuation else where so other terms are also properly indexed.


Before we look at the solution, let’s consider how Solr’s fieldType element works.  As you would expect, I am going to point you to the official Solr Wiki on Analyzers, Tokenizers and TokenFilters. Although you can put your tokenizers, filters and charFilter elements in any order you choose, Solr will process them in this order.

  1. charFilter
  2. analyzer
  3. filter

Read more