Skip to main content

Apache Solr

Apache Solr Search

How to make Apache solr search programmatically from Drupal 7

Recently I came across a situation where I needed to make Apache solr search from drupal programmatically. Basically we have Apache solr module available in drupal, which enables to connect with solr for searching. There are loads of documentation for setting solr search with drupal, so instead going into those details, lets head straight to the custom code required to make programmatic solr search from drupal:

Apache Solr

Apache Solr View Count module

While working with Apache solr in drupal, I had to sort the results based on relevancy, date, and popularity. The Apache solr sort module allowed me to sort based on relevancy and date, but sorting based on popularity wasn't available. What I mean by sorting based on popularity is that sorting based on the view count of each result.

Drupal 7 SOLR

Drupal 7 filtering SOLR results

Search plays a crucial role in content driven websites. Drupal and the Open source enterprise search platform Solr form a effective combination. Drupal 7 has apachesolr module which  integrates Drupal with the Apache Solr search platform. I am going to detail on how to alter the solr query to get better and precise results.

knackforge blog knowledge base

Configure Apache Solr with Tomcat

At many times Drupal Architects prefer to go with Apache Solr instead of Drupal core search. I am no outlander to this scenario, but this time it was a new requirement. By default the Apache Solr relies on Jetty server to index and retrive items during the search. My need was to use Tomcat server in the place of Jetty. The first glance proved it was an easy task, but latter the tough fight started.


How to protect Apache Solr admin console

If you are using the default start.jar that comes along with Apache solr, to run your solr server instances for Drupal site, the following instructions might help to secure the administrative console from unauthorized access.

The default setup relies on Jetty,


knackforge blog knowledge base

Querying the data in Apache Solr index from drupal module

At KnackForge we thrive hard to deliver best Drupal sites. As a part of this cause, for our potential Drupal sites we opt to use Apache solr as engine offering searching functionality. This makes our sites more scalable.

Recently team KnackForge was engaged in developing a massive Science News publishing site inspired by More details about this site can be found in this case study page in


Integrating Solr and Mahout classifier


Solr has been a revolution in search world with its major implementations. Mahout is an exciting tool for machine learning work. In this article I am going to cover about the integration of Solr and Mahout for classification process.



Classification here is the process of categorizing a content into pre-defined set of categories. Classification process depends on model created from training sets. I will cover about mahout classification in my next blog.


Subscribe to Apache Solr