Should you use Solritas on Production?

It’s two months since I started studing Solr 3.5.0 deeply. One thing that I tryed was Solr integration with a template system called Apache Velocity.

Solr comes with an example application called Solritas. It is a set of template files (.vm extension) and a Request Handler configuration of field, range and date facets, terms for suggestion, geographic search and so on.

Solritas is so simple and easy to use that I decided to customize it in two situations.

The first one is a product catalog. A friend of mine has a company and he travels to Asia from time to time in order to buy huge quantities of handcrafted produtcs to sell in Brazil. What I did was to have Solr to index a CSV file (generated by its COBOL system) of all these products and costumize Solritas making it fit my friend’s requirements. The following is the final result of a Solritas remake I did.

Figure 1 - A Product Catalog based on Solritas

The second project is related to the user registration system of OGlobo and Extra newspapers website. Unfortunately I can print screen it at this moment. Maybe later.

The conclusion of customizing Solritas was that it’s very easy and simple. You can really do good things with it very, very, very fast.

I had no doubt It’s possible to put such projects live. But of course there are some extra work to be considered before doing it.

There was a discussion on Solr user discussion group ( talking about if one should put on production such Solritas. My opinion is that before doing it one should at least have in mind the follwing topics:

  • if you are going to use a DIH (Data Import Handler) with a database do not let the database configuration plain in data-config.xml. Let data-config.xml references a jndi of your database config
  • in order to restrict access to the Solr admin interface, change authentication configuration in the solr war’s web.xml
  • have in mind that Solritas uses a template system (Apache Velocity). It is limited in the way you wont be able to build backend processing with it
  • fell free to customize Solritas layout using CSS3, HTML5, ajax and all client side stuff
  • consider using and Apache Httpd as a reverse proxy to restrict direct access to your solritas
  • if you have a high traffic landing on you Solritas, consider having a Varnish in front of it

Of course all of that will depend on your project’s requirements. At least it would be a good idea to customize Solritas as part of a Lean Startup project.


5 comentários sobre “Should you use Solritas on Production?

  1. Thankyou for the excellent article, im thinking of just modifying velocity to my needs as well.
    Apart from apache httpd and varnish, what else do you need to consider? Any other security issues?

    • Hi Dan! Thanks!

      I don’t see any other big security issue. Just always remember that it’s a java web application. Every security concerns that can be applyed to a java web application can also be applyed to Solr’s web application.

      Whatever you do consider submitting the source code to the project. Open source projects are a two way channel!

    • Hey Dan,
      I am coming late to the party…
      If you have any source code or experience you can share on the subject, I will be very interested.


  2. Hi Marcelo Carvalho Fernandes,
    I am comming late to the party but anyway.
    Great article, thank you very much.

    Do you have any source code of the application you have developed in the past using only Solr (maybe a github repo or something)?
    I will be very interested to see the twist that you made to the Solritas app.

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do

Você está comentando utilizando sua conta Sair /  Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )


Conectando a %s